Procedural Abstraction
Here is an abstract version of tail recursion
(define tail-recur
(lambda (seed action)
(letrec ((helper
(lambda (l)
(if (null? l) seed
(action (car l) (helper (cdr l)))))))
helper)))
Previous slide
Next slide
Back to first slide
View graphic version