Skip to content

Commit d875835

Browse files
committed
Fixed typos in code examples.
1 parent 9bd680a commit d875835

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

_includes/bullet-concurrency-distribution.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
<figcaption>Concurrent/Distributed</figcaption>
33
<pre><code>val x = future { someExpensiveComputation() }
44
val y = future { someOtherExpensiveComputation() }
5-
val z = for (a <- x; b <- y) yield a*b
6-
for (c <- z) println("Result: " + c)
5+
val z = for (a &lt;- x; b &lt;- y) yield a*b
6+
for (c &lt;- z) println("Result: " + c)
77
println("Meanwhile, the main thread goes on!")</code></pre>
88
</figure>
99

1010
<div class="snippet-explanation">
11-
<h3>Go Concurrent or Distributed with Futures & Promises</h3>
11+
<h3>Go Concurrent or Distributed with Futures &amp; Promises</h3>
1212
<p>In Scala, futures and promises can be used to process data <i>asynchronously</i>, making it easier to parallelize or even distribute your application.</p>
1313
<p>
1414
In this example, the <code>future{}</code> construct evaluates its argument asynchronously, and returns

_includes/bullet-java-interop.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ <h3>Combine Scala and Java seamlessly</h3>
4747
their methods and inherit from Java classes transparently from Scala.
4848
Similarly, Java code can reference Scala classes and objects.</p>
4949
<p>
50-
In this example, the scala class <code>Author</code> implements the Java
51-
interface <code>Comparable&lt;T&gt;</code> and work with Java
50+
In this example, the Scala class <code>Author</code> implements the Java
51+
interface <code>Comparable&lt;T&gt;</code> and works with Java
5252
<code>File</code>s. The Java code uses a method from the companion object
5353
<code>Author</code>, and accesses fields of the <code>Author</code> class.
5454
It also uses <code>JavaConversions</code> to convert between Scala collections

_includes/bullet-pattern-matching.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<div class="snippet-explanation">
1616
<h3>Switch on the structure of your data</h3>
1717
<p>In Scala, <em>case classes</em> are used to represent structural data
18-
types. The implicitly equip the class with meaningful <code>toString</code>,
18+
types. They implicitly equip the class with meaningful <code>toString</code>,
1919
<code>equals</code> and <code>hashCode</code> methods, as well as the
2020
ability to be deconstructed with <em>pattern matching</em>.</p>
2121
<p>

_includes/bullet-traits.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
}
1111
trait CommandoBridge extends Spacecraft {
1212
def engage(): Unit = {
13-
for (_ <- 1 to 3)
13+
for (_ &lt;- 1 to 3)
1414
speedUp()
1515
}
1616
def speedUp(): Unit
@@ -31,7 +31,7 @@
3131
</figure>
3232

3333
<div class="snippet-explanation">
34-
<h3>Flexibly Combine Interface & Behavior</h3>
34+
<h3>Flexibly Combine Interface &amp; Behavior</h3>
3535
<p>
3636
In Scala, <i>multiple traits</i> can be mixed into a class to combine their interface and their
3737
behavior.</p>

0 commit comments

Comments
 (0)