summaryrefslogtreecommitdiff
path: root/tests/letrec.lisp
blob: 52a7de9ca90cc372dd0f9f9c5d5d5aeca80a78f4 (plain)
1
2
3
4
5
6
(define fibo (n)
    (let ((helper (lambda (m a b)
                        (if (= m n) b (helper m b (+ a b))))))
        (if (<= n 0) 0
         (if (<= n 2) 1
          (helper 2 1 1)))))