[racket] continuation barrier in raise

From: Casey Klein (clklein at eecs.northwestern.edu)
Date: Wed Jan 5 07:56:05 EST 2011

On Wed, Jan 5, 2011 at 6:32 AM, Keiko Nakata <keiko at kurims.kyoto-u.ac.jp> wrote:
> Hello,
> Will someone give me an example which shows the continuation barrier
> introduced by 'raise'?  I.e., I want an program which raises an exception
> because of the barrier.
> I think I do not understand the documentation properly,
> so have been failing  to produce such an example myself...

How about this one?

(define t (make-continuation-prompt-tag))

 (λ ()
    (λ (_)
       (λ (k) (abort-current-continuation t k))
    (λ () (raise 3))))
 (λ (k)
    (λ () (k 4))

Posted on the users mailing list.