Project Euler Problem 2 in Scheme
This one was relatively straight forward.
(define (fib-iter last-one last-two total max) (if (or (> (+ last-one last-two) max) (= (+ last-one last-two) max)) total (fib-iter (+ last-one last-two) last-one (if (= (modulo (+ last-one last-two) 2) 0) (+ total last-one last-two) total) max))) (fib-iter 1 0 0 4000000)