From f8c9564372709e0634c9eb0c208ec9cc31a93de7 Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Tue, 25 Dec 2018 01:54:02 +0100 Subject: Add if construct; fib example --- test/fib.result | 1 + test/fib.test | 2 ++ 2 files changed, 3 insertions(+) create mode 100644 test/fib.result create mode 100644 test/fib.test (limited to 'test') diff --git a/test/fib.result b/test/fib.result new file mode 100644 index 0000000..08c2ab3 --- /dev/null +++ b/test/fib.result @@ -0,0 +1 @@ +1346269 diff --git a/test/fib.test b/test/fib.test new file mode 100644 index 0000000..cb5a5fa --- /dev/null +++ b/test/fib.test @@ -0,0 +1,2 @@ +fib n = if n (if (n-1) (fib(n-1) + fib(n-2)) 1) 1 +fib(30) -- cgit v1.2.3