Tutorial by Examples: desugaring

for comprehensions in Scala are just syntactic sugar. These comprehensions are implemented using the withFilter, foreach, flatMap and map methods of their subject types. For this reason, only types that have these methods defined can be utilized in a for comprehension. A for comprehension of the fo...

Page 1 of 1