We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cb388f7 commit 1a4e224Copy full SHA for 1a4e224
archive/f/flix/baklava.flix
@@ -0,0 +1,9 @@
1
+def baklavaLine(n: Int32): String =
2
+ let numSpaces = Int32.abs(n);
3
+ let numStars = 21 - 2 * numSpaces;
4
+ String.repeat(numSpaces, " ") + String.repeat(numStars, "*")
5
+
6
+def main(): Unit \ IO =
7
+ List.range(-10, 11) |>
8
+ List.map(baklavaLine) |>
9
+ List.forEach(println)
0 commit comments