summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/fib.ur10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/fib.ur b/tests/fib.ur
new file mode 100644
index 00000000..9d7fd340
--- /dev/null
+++ b/tests/fib.ur
@@ -0,0 +1,10 @@
+fun fib n =
+ if n = 0 then
+ 0
+ else if n = 1 then
+ 1
+ else
+ fib (n - 1) + fib (n - 2)
+
+fun main n : transaction page =
+ return <xml>{[fib n]}</xml>