Faq - How does yield work? - Scala Documentation

Though there’s a yield in other languages such as Python and Ruby, Scala’s yield does something very different from them. In Scala, yield is part of for comprehensions – a generalization of Ruby and Python’s list-comprehensions.

This is a companion discussion topic for the original entry at http://docs.scala-lang.org//tutorials/FAQ/yield.html