Created
April 14, 2012 14:17
-
-
Save ducky-hong/2384691 to your computer and use it in GitHub Desktop.
간단한 369 게임
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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