Slightly change call semantics, add looping construct, inline some JS

This commit is contained in:
2024-11-14 15:32:46 -06:00
parent 9291e65c11
commit 74f1fdc5ea
4 changed files with 47 additions and 27 deletions

View File

@@ -1,9 +1,10 @@
## Obligatory
fizzbuzz <- x ->
if x % 15 = 0 print("fizzbuzz")
elif x % 3 = 0 print("fizz")
elif x % 5 = 0 print("buzz")
else print(x)
if x < 100 fizzbuzz(x + 1) ## TODO add looping construct(s)
fizzbuzz(1)
fizzbuzz <- ->
loop(range(100), x ->
if x % 15 = 0 print("fizzbuzz")
elif x % 3 = 0 print("fizz")
elif x % 5 = 0 print("buzz")
else print(x)
)
fizzbuzz()