Created
June 10, 2014 09:13
-
-
Save funatsufumiya/50c66ad85793f869a308 to your computer and use it in GitHub Desktop.
Draw Triangles on REPL
This file contains 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
(doseq [i (take 25 (cycle (range 1 6)))] (println (apply str (repeat i "o")))) |
This file contains 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
([1,2,3,4,5]*5).each{println("o"*it)} |
This file contains 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
(1 to 25).map((i) => (i-1)%5+1).foreach((i) => println("o"*i)) |
This file contains 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
o | |
oo | |
ooo | |
oooo | |
ooooo | |
o | |
oo | |
ooo | |
oooo | |
ooooo | |
o | |
oo | |
ooo | |
oooo | |
ooooo | |
o | |
oo | |
ooo | |
oooo | |
ooooo | |
o | |
oo | |
ooo | |
oooo | |
ooooo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment