(define jumper
  (lambda (n m)
    (letrec
	((rec
	  (lambda (n m jump)
	    (if (= n 0) (jump '())
		(if (= n m)
		    (call-with-current-continuation
		     (lambda (t) (rec (- n 1) m t)))
		    (rec (- n 1) m jump)))
	     (display n) (newline))))
      (rec n m (lambda (v) v)))))
(jumper 10 3)
(jumper 6 4)

