Skip to content

Instantly share code, notes, and snippets.

@shigemk2 shigemk2/loop2.scala

Created Jan 31, 2015
Embed
What would you like to do?
for (i <- 1 to 10 if i % 2 == 0) println(i)
println("-----------")
for {
i <- 1 to 10
if i % 2 == 0
} println(i)
println("-----------")
for {
i <- 1 to 10
if i > 3
if i < 6
if i % 2 == 0
} println(i)
println("-----------")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.