2/16/2007

Call/cc again

I wonder why does this procedure just evaluate (+ n 1), rather return the value?
(define (integ)
 (call/cc
   (lambda (skip)
     (let R ((n 0))
       (cond ((eq? n 10)
              'exceed)
             (else
              (call/cc
               (lambda (k)
                 (set! integ k)
                 (skip (+ n 1))))
              (R (+ n 1))))))))

0 Comments:

Post a Comment

<< Home