If you're interested in the details of the translation scheme of a Scala for loop (for comprehension), here's a quick look at how a for loop is translated into, well, other code.
A simple Scala for loop
In a first example, we'll start with the following Scala class:
class Main {
def foo { for(i <- 0 to 10) println(i) }
}
Next, I compile this class from the command line like this: