aboutsummaryrefslogtreecommitdiffstats
path: root/examples/fibo.milch
diff options
context:
space:
mode:
authorJan Tuomi <jans.tuomi@gmail.com>2022-12-05 14:57:54 +0200
committerJan Tuomi <jans.tuomi@gmail.com>2022-12-05 14:57:54 +0200
commit58ae983e0dc2e3a9fe7a0fd29c3342289812d3f8 (patch)
tree113fb4fe90d10642155af90b30d51bb320e799d1 /examples/fibo.milch
parent4002b8988c799a904ef1f359d4267ef4ad80cba3 (diff)
Add -O2 to ghc-options
Diffstat (limited to 'examples/fibo.milch')
-rw-r--r--examples/fibo.milch7
1 files changed, 7 insertions, 0 deletions
diff --git a/examples/fibo.milch b/examples/fibo.milch
new file mode 100644
index 0000000..26c74a1
--- /dev/null
+++ b/examples/fibo.milch
@@ -0,0 +1,7 @@
+(let! fibo (\[n]
+ (match n
+ 0 0
+ 1 1
+ _ (+ (fibo (- n 1)) (fibo (- n 2))))))
+
+(fibo 30)