aboutsummaryrefslogtreecommitdiff
path: root/tests/src/fib.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/src/fib.nim')
-rw-r--r--tests/src/fib.nim13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/src/fib.nim b/tests/src/fib.nim
new file mode 100644
index 0000000..34d38f0
--- /dev/null
+++ b/tests/src/fib.nim
@@ -0,0 +1,13 @@
+# fake nim
+
+func fib(x): int -> int =
+ if eq(x, 0):
+ 0
+ else:
+ if eq(x, 1):
+ 1
+ else: # comment
+ add(fib(sub(x, 1)), fib(sub(x, 2)))
+
+negate(negate(1))
+fib(5)