Skip to content

Instantly share code, notes, and snippets.

@kamiyaowl
Created February 8, 2014 16:13
Show Gist options
  • Save kamiyaowl/8886071 to your computer and use it in GitHub Desktop.
Save kamiyaowl/8886071 to your computer and use it in GitHub Desktop.
toとuntilの違い
val x = 5
for(i <- 0 to x){ print(i) }
//012345
for(i <- 0 until x){ print(i) }
//01234
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment