Let’s look at a more complicated example I found online
How C# beats Scala in async programming
Nicolas A Perez
3613

See how clear and less boiler plat is Scala:

def love = Future {
Thread.sleep(500)
“i love you”
}
def parting(loveLetter: String) = Future {
println(loveLetter)
Thread.sleep(500)
“not really”
}
love flatMap parting foreach println
// or
for {
loveLetter <- love
partingWords <- parting(loveLetter)
} yield println(partingWords)
One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.