Skip to content

Commit b16cbfc

Browse files
authored
Add Baklava in Pinecone (#4066)
1 parent b89c61f commit b16cbfc

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

archive/p/pinecone/baklava.pn

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
repeatStr :: {n: Int, c: String} -> {String}: (
2+
s: ""
3+
i: 0 | i < in.n | i: i + 1 @ (
4+
s: s + in.c
5+
)
6+
7+
s
8+
)
9+
10+
i: 0 - 10 | i <= 10 | i: i + 1 @ (
11+
numSpaces: i
12+
i < 0 ? (
13+
numSpaces: 0 - i
14+
)
15+
print: (repeatStr: numSpaces, " ") + (repeatStr: 21 - 2 * numSpaces, "*")
16+
)

0 commit comments

Comments
 (0)