Skip to content

Commit

Permalink
Add Baklava in Pinecone (#4066)
Browse files Browse the repository at this point in the history
  • Loading branch information
rzuckerm authored Dec 2, 2024
1 parent b89c61f commit b16cbfc
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions archive/p/pinecone/baklava.pn
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
repeatStr :: {n: Int, c: String} -> {String}: (
s: ""
i: 0 | i < in.n | i: i + 1 @ (
s: s + in.c
)

s
)

i: 0 - 10 | i <= 10 | i: i + 1 @ (
numSpaces: i
i < 0 ? (
numSpaces: 0 - i
)
print: (repeatStr: numSpaces, " ") + (repeatStr: 21 - 2 * numSpaces, "*")
)

0 comments on commit b16cbfc

Please sign in to comment.