Possible Duplicate:
Scala “<-” for comprehension
Could someone please explain how the <- operator in Scala works, or at least point me to a link. Someone tweeted a Scala tip: use <- instead of flatmap. Cool but how?
Possible Duplicate:
Scala “<-” for comprehension
Could someone please explain how the <- operator in Scala works, or at least point me to a link. Someone tweeted a Scala tip: use <- instead of flatmap. Cool but how?
for-comprehension (<-) is just a syntactic sugar for composition of multiple collection-like operations (foreach, map, flatMap, filter etc.)
This is a good article that explains what for-comprehensions translate into: