4 lines
152 B
Racket
4 lines
152 B
Racket
(define (fib n)
|
|
(car (foldl (lambda (y x)
|
|
(let ((a (car x)) (b (cdr x)))
|
|
(cons b (+ a b)))) (cons 0 1) (range n))))
|