Skip to content
This repository
Browse code

publish by marius

  • Loading branch information...
commit 55bc5b8d18527111f6e44897cbd4d7166094f42d 1 parent 48e97df
marius a. eriksen mariusaeriksen authored

Showing 2 changed files with 5 additions and 5 deletions. Show diff stats Hide diff stats

  1. BIN  coll.png
  2. +5 5 index.html
BIN  coll.png
10 index.html
@@ -1040,7 +1040,7 @@ <h1 class="header">Effective Scala</h1>
1040 1040 yielding code that is referentially transparent, providing stronger
1041 1041 invariants and thus also easier to reason about. Case classes, pattern
1042 1042 matching, destructuring bindings, type inference, and lightweight
1043   -closure and method creation syntax are the tools of this trade.</p>
  1043 +closure- and method-creation syntax are the tools of this trade.</p>
1044 1044
1045 1045 <p><a id="Functional programming-Case classes as algebraic data types" /></p>
1046 1046
@@ -1062,7 +1062,7 @@ <h1 class="header">Effective Scala</h1>
1062 1062 <p class="LP">the type <code>Tree[T]</code> has two constructors: <code>Node</code> and <code>Leaf</code>. Declaring the type <code>sealed</code> allows the compiler to do exhaustivity analysis since constructors cannot be added outside the source file.</p>
1063 1063
1064 1064 <p>Together with pattern matching, such modelling results in code that is
1065   -both succinct &ldquo;obviously correct&rdquo;:</p>
  1065 +both succinct and &ldquo;obviously correct&rdquo;:</p>
1066 1066
1067 1067 <pre><code>def findMin[T &lt;: Ordered[T]](tree: Tree[T]) = tree match {
1068 1068 case Node(left, right) =&gt; Seq(findMin(left), findMin(right)).min
@@ -1372,7 +1372,7 @@ <h1 class="header">Effective Scala</h1>
1372 1372
1373 1373 <h2>Object oriented programming</h2>
1374 1374
1375   -<p>Much of Scala&rsquo;s vastness lie in its object system. Scala is a <em>pure</em>
  1375 +<p>Much of Scala&rsquo;s vastness lies in its object system. Scala is a <em>pure</em>
1376 1376 language in the sense that <em>all values</em> are objects; there is no
1377 1377 distinction between primitive types and composite ones.
1378 1378 Scala also features mixins allowing for more orthogonal and piecemeal
@@ -1381,7 +1381,7 @@ <h1 class="header">Effective Scala</h1>
1381 1381
1382 1382 <p>A motivation behind the mixin system was to obviate the need for
1383 1383 traditional dependency injection. The culmination of this &ldquo;component
1384   -style&rdquo; of programming is <a href="http://jboner.github.com/2008/10/06/real-world-scala-dependency-injection-di.html">the cake
  1384 +style&rdquo; of programming is <a href="http://jonasboner.com/2008/10/06/real-world-scala-dependency-injection-di/">the cake
1385 1385 pattern</a>.</p>
1386 1386
1387 1387 <p><a id="Object oriented programming-Dependency injection" /></p>
@@ -1397,7 +1397,7 @@ <h1 class="header">Effective Scala</h1>
1397 1397 program modularization</em>, and in particular, <em>prefer composition over
1398 1398 inheritance</em> &mdash; for this leads to more modular and testable programs.
1399 1399 When encountering a situation requiring inheritance, ask yourself: how
1400   -you structure the program if the language lacked support for
  1400 +would you structure the program if the language lacked support for
1401 1401 inheritance? The answer may be compelling.</p>
1402 1402
1403 1403 <p>Dependency injection typically makes use of traits,</p>

0 comments on commit 55bc5b8

Please sign in to comment.
Something went wrong with that request. Please try again.