Added fib example

This commit is contained in:
Devine Lu Linvega 2024-04-29 17:20:00 -07:00
parent b52a4adb2f
commit 9b50f530ec
1 changed files with 6 additions and 0 deletions

6
examples/fib.modal Normal file
View File

@ -0,0 +1,6 @@
<> (`?: ?0 ?1) ((Int ?:))
<> (fib ?n) (?n (Int 0) (Int 1) Fib)
<> ((Int 0) (Int ?0) (Int ?1) Fib) ?0
<> ((Int ?x) (Int ?y) (Int ?z) Fib) (`- ?x 1 (Int ?z) `+ ?z ?y Fib)
fib (Int 11)