diff options
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 |