;; tail recursive version of range
(bind-func range:[List{!a}*,!a,!a,!a]*
(lambda (mn mx i)
(let ((rng (lambda (m x lst)
(if (< x m)
lst
(rng m (- x i) (Cons x lst))))))
(rng mn mx (Nil)))))