aboutsummaryrefslogtreecommitdiff
path: root/examples/fib.ph
diff options
context:
space:
mode:
Diffstat (limited to 'examples/fib.ph')
-rw-r--r--examples/fib.ph11
1 files changed, 11 insertions, 0 deletions
diff --git a/examples/fib.ph b/examples/fib.ph
new file mode 100644
index 0000000..9e1a185
--- /dev/null
+++ b/examples/fib.ph
@@ -0,0 +1,11 @@
+function Fib{ num[int] } return int
+is
+ do
+ 1
+ unless 1 < num
+ otherwise
+ Fib(num - 1) + Fib(num - 2)
+ done
+end function
+
+print Fib(42)