(bind-func scanr:[List{!b}*,[!b,!b,!a]*,!b,List{!a}*]*
(lambda (fn end lst)
(let ((scan (lambda (l rl)
(if (null? l) rl
(scan (cdr l)
(cons (fn (car rl)
(car l))
rl))))))
(reverse (scan (reverse lst) (list end))))))