Skip to content

Instantly share code, notes, and snippets.

@tototoshi
Created September 3, 2011 15:34
Show Gist options
  • Save tototoshi/1191354 to your computer and use it in GitHub Desktop.
Save tototoshi/1191354 to your computer and use it in GitHub Desktop.
名前渡し
def repeat(n: Int)(f: => Unit) {
for (i <- 0 until n) {
f
}
}
repeat(3){
println("Hello")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment