Back to Developer Roadmap

for-comprehensions

src/data/roadmaps/scala/content/[email protected]

4.0819 B
Original Source

for-comprehensions

For-comprehensions in Scala are used to evaluate expressions and return a sequence of values. They have the form for (enumerators) yield e, where enumerators refer to a list of enumerators. They are basically syntax sugar over flatMap but they help a lot in making your code both safe and.

Visit the following resources to learn more: