This is using MIT Scheme, coming from the infamous SICP. I just can't wrap my head around what is happening.
Here's a procedure to compute N!
.
(define (factorial n)
(if (= n 0)
1
(* n (factorial (- n 1)))))
Here's a procedure to compute Fibonacci
(define (fib n)
(cond ((= n 0) 0)
((= n 1) 1)
(else (+ (fib (- n 1))
(fib (- n 2))))))