Re:Scala 2.12.0 is now available
by runT1ME on Thursday November 03, 2016 @02:25PM
(#12866551)
This is what monadic syntax is for. You can do the following for any Future in scala:
which just gets rewritten to
This doesn't just work for futures, it works for any monad. This is super amazingly useful. Also, query syntax for LINQ in C#/F# can support this too.
[ Parent
| on HN ]
With scala async, you can also express this in direct style: https://github.com/scala/async.