aboutsummaryrefslogtreecommitdiffhomepage
path: root/samples/rosetta/99_bottles_of_beer.bruijn
blob: 7ff337106e779f7e9e801f86e38c19c346f5a0e2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
:import std/Combinator .
:import std/Number .
:import std/String .

main y [[rec]] (+99)
	rec =?0 case-end case-rec
		case-rec n ++ t1 ++ n ++ t2 ++ t3 ++ n ++ t1 ++ "\n" ++ (1 --0)
			n number→string 0
			t1 " bottles of beer on the wall\n"
			t2 " bottles of beer\n"
			t3 "Take one down, pass it around\n"
		case-end empty