Date: Sat, 10 Jul 2010 20:45:29 +0000
   From: Taylor R Campbell <[email protected]>

   What should I do if I want to preclude only multiple uses of the
   continuation, but still allow single uses even if they are non-local?

Sorry, should've spent half a minute thinking about that before making
my message even longer by asking it.

(define (guarantee-single-return procedure)
  (let ((returned? #f))
    (begin0 (procedure)
      (if returned? (error "Multiple return prohibited."))
      (set! returned? #t))))
_________________________________________________
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/users

Reply via email to