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 8e8cdd2 commit e8fdc08Copy full SHA for e8fdc08
archive/s/spry/baklava.sy
@@ -0,0 +1,13 @@
1
+abs = func [:x
2
+ ($x >= 0) then: [ $x ] else: [ 0 - $x ]
3
+]
4
+
5
+repeat_string:times: = func [:s :n
6
+ ($n > 0) then: [ $s, repeat_string: $s times: ($n - 1) ] else: [ "" ]
7
8
9
+-10 to: 10 do: [
10
+ num_spaces = abs :i
11
+ num_stars = (21 - (num_spaces * 2))
12
+ echo (repeat_string: " " times: num_spaces, repeat_string: "*" times: num_stars)
13
0 commit comments