(define (scan proc val lst) (if (null? lst) '() (cons (proc val (car lst)) (scan proc (proc val (car lst)) (cdr lst)))))