Added fizzbuzz-alu example

This commit is contained in:
Devine Lu Linvega 2024-04-29 18:06:17 -07:00
parent 9b50f530ec
commit 2f24c7d83f
1 changed files with 9 additions and 0 deletions

View File

@ -0,0 +1,9 @@
<> (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