Skip to content

Commit 1b07781

Browse files
authored
Add Baklava in Io (#4155)
1 parent c90151a commit 1b07781

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

archive/i/io/Baklava.io

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
baklavaLine := method(n,
2+
num_spaces := n abs
3+
num_stars := 21 - (2 * num_spaces)
4+
(" " repeated(num_spaces)) .. ("*" repeated(num_stars))
5+
)
6+
7+
for(n, -10, 10, baklavaLine(n) println)

0 commit comments

Comments
 (0)