Skip to content

Instantly share code, notes, and snippets.

@ducky-hong
Created April 14, 2012 14:17
Show Gist options
  • Save ducky-hong/2384691 to your computer and use it in GitHub Desktop.
Save ducky-hong/2384691 to your computer and use it in GitHub Desktop.
간단한 369 게임
def start(limit: Int) {
1 to limit foreach {
x => val c = x.toString count ("369" contains _)
println ( if (c > 0) "clap! " * c ; else x )
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment