iterating

How to iterate over Scala Lists with foreach and for

Scala List/sequence FAQ: How do I iterate over a Scala List using the foreach method or for loop?

There are a number of ways to iterate over a Scala List using the foreach operator and for comprehension, and I'll show a few of those approaches here.

This website is a little one-man operation. If you found this information helpful, I’d appreciate it if you would share it.