reduction.scm - The function reduce-left. | Lecture 4 - slide 16 : 34 Program 2 |
(define (reduce-left f lst) (reduce-help-left f (cdr lst) (car lst))) (define (reduce-help-left f lst res) (if (null? lst) res (reduce-help-left f (cdr lst) (f res (car lst)))))