diff options
author | Marvin Borner | 2024-03-03 15:03:41 +0100 |
---|---|---|
committer | Marvin Borner | 2024-03-03 22:29:24 +0100 |
commit | 6ae44d09faa0ae353c0818705503cad42127d102 (patch) | |
tree | a923d00d520f85a608f51416184e5b3b6f178549 /samples/rosetta/fizzbuzz.bruijn | |
parent | 03155d6e515c76d5ab59f814592484c849313130 (diff) |
Even more samples
wtf
Diffstat (limited to 'samples/rosetta/fizzbuzz.bruijn')
-rw-r--r-- | samples/rosetta/fizzbuzz.bruijn | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/samples/rosetta/fizzbuzz.bruijn b/samples/rosetta/fizzbuzz.bruijn new file mode 100644 index 0000000..7f61704 --- /dev/null +++ b/samples/rosetta/fizzbuzz.bruijn @@ -0,0 +1,11 @@ +:import std/Combinator . +:import std/String . +:import std/Number . + +main [y [[0 =? (+101) case-end case-rec]] (+1)] + case-rec str ++ "\n" ++ (1 ++0) + str fizzbuzz "FizzBuzz" (fizz "Fizz" (buzz "Buzz" (number→string 0))) + fizz =?(0 % (+3)) + buzz =?(0 % (+5)) + fizzbuzz fizz buzz fizz + case-end empty |