Skip to content

Commit

Permalink
Added new slow test
Browse files Browse the repository at this point in the history
  • Loading branch information
Melchizedek6809 committed Apr 26, 2024
1 parent 7e9a151 commit 3126755
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/slow/recfib.nuj
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env nujel

(defn fib (n)
(cond ((zero? n) 0)
((= 1 n) 1)
(#t (+ (fib (- n 1)) (fib (- n 2))))))

(def res (fib 36))
(when-not (= res 14930352)
(throw (list :wrong-result "Wrong result" res)))
:success

0 comments on commit 3126755

Please sign in to comment.