Merge pull request #96 from amir343/master

A typo is corrected in Future example Scala code, by Amir!
This commit is contained in:
viktorklang 2011-10-24 02:00:49 -07:00
commit 33bcb38fcd

View file

@ -91,7 +91,7 @@ The ``map`` method is fine if we are modifying a single ``Future``, but if 2 or
}
}
val result = f2.get().get()
val result = f3.get().get()
The ``get`` method had to be used twice because ``f3`` is a ``Future[Future[Int]]`` instead of the desired ``Future[Int]``. Instead, the ``flatMap`` method should be used:
@ -111,7 +111,7 @@ The ``get`` method had to be used twice because ``f3`` is a ``Future[Future[Int]
}
}
val result = f2.get()
val result = f3.get()
For Comprehensions
^^^^^^^^^^^^^^^^^^