aboutsummaryrefslogtreecommitdiffhomepage
path: root/samples/rosetta/fizzbuzz.bruijn
blob: 7f6170416815a9dc2adb934a513a269abe130fa2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
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