From 76478dd79705313860c00008cee75c48db814ecc Mon Sep 17 00:00:00 2001 From: Marcin Chrzanowski Date: Sun, 13 May 2018 21:12:57 +0200 Subject: Add examples --- good/fib.mim | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 good/fib.mim (limited to 'good/fib.mim') diff --git a/good/fib.mim b/good/fib.mim new file mode 100644 index 0000000..9d2c04f --- /dev/null +++ b/good/fib.mim @@ -0,0 +1,7 @@ +(letrec (fib : Int -> Int n : Int) + (letrec (fibh : (Int -> Int -> Int -> Int) a : Int b : Int k : Int) + (if (= k 0) + a + (fibh b (+ a b) (- k 1))) + (fibh 0 1 n)) + (fib 10)) -- cgit v1.2.3