From 9b50f530ecc4dafa487e86fb97a71f957f1877ff Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Mon, 29 Apr 2024 17:20:00 -0700 Subject: [PATCH] Added fib example --- examples/fib.modal | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 examples/fib.modal diff --git a/examples/fib.modal b/examples/fib.modal new file mode 100644 index 0000000..e422a49 --- /dev/null +++ b/examples/fib.modal @@ -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) \ No newline at end of file