summaryrefslogtreecommitdiff
path: root/tests/lambdarec.lisp
blob: 69b830ccecb6b1308bdef51e9bf14eaa515331d0 (plain)
1
2
3
4
5
6
(define fibo (n)
    (let ((helper (lambdarec rec (m a b)
                        (if (= m n) b (rec m b (+ a b))))))
        (if (<= n 0) 0
         (if (<= n 2) 1
          (helper 2 1 1)))))