diff options
author | Braxton Hall | 2023-07-13 18:42:31 +0000 |
---|---|---|
committer | GitHub | 2023-07-13 18:42:31 +0000 |
commit | 531a3496c10c2ee789509f218921d2109354dfe9 (patch) | |
tree | bfe99e81e91603508be51bcd31f7bbb4d48f6b6f /entries/jj/nim | |
parent | 777b3fba70f2253fa2f8f0bd4c9b207b8ce0a11f (diff) | |
parent | c37b806da507a699624ec4e800522ef4a47ad7bc (diff) |
Merge pull request #97 from braxtonhall/jj-to-omentic
Diffstat (limited to 'entries/jj/nim')
-rw-r--r-- | entries/jj/nim/fib.nim | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/entries/jj/nim/fib.nim b/entries/jj/nim/fib.nim deleted file mode 100644 index a12f8e6..0000000 --- a/entries/jj/nim/fib.nim +++ /dev/null @@ -1,17 +0,0 @@ -func fib(n: Natural): Natural = - if n < 2: - return n - else: - return fib(n-1) + fib(n-2) - -func fib2(n: int, a = 0, b = 1): int = - return if n == 0: a else: fib2(n-1, b, a+b) - -iterator fib3: int = - var a = 0 - var b = 1 - while true: - yield a - swap a, b - b += a - |