modal/examples/fizzbuzz-alu.modal

9 lines
375 B
Plaintext
Raw Normal View History

2024-04-29 21:06:17 -04:00
<> (fizzbuzz ?x ?x) (done.)
<> (?x Int 0 Int 0 test) (?(?: ?:) (Fizz Buzz\n))
<> (?x Int 0 Int ?z test) (?(?: ?:) Fizz\n)
<> (?x Int ?y Int 0 test) (?(?: ?:) Buzz\n)
<> (?x Int ?y Int ?z test) (?(?: ?:) (?x \n))
<> (?x eval) (?x ?((?0 ?1 ?:) (Int ?:)) ?x 3 % ?((?0 ?1 ?:) (Int ?:)) ?x 5 % test)
<> (fizzbuzz ?x ?y) (?x eval fizzbuzz ?((?0 ?1 ?:) ?:) ?x 1 + ?y)
fizzbuzz 1 30