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?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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:
http://docs.scala-lang.org/tutorials/FAQ/yield.html