From 7b4442af8549b212d38e8ecfbf8a62217db7b220 Mon Sep 17 00:00:00 2001 From: JJ Date: Tue, 11 Apr 2023 20:24:44 -0700 Subject: https://youtu.be/GwQW3KW3DCc?t=63 --- tests/src/fib.nim | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 tests/src/fib.nim (limited to 'tests/src/fib.nim') 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) -- cgit v1.2.3-70-g09d2