[plt-scheme] Fun with Unicode and delimited continuations

From: Sam Tobin-Hochstadt (samth at ccs.neu.edu)
Date: Fri Jun 4 13:55:41 EDT 2010

On Fri, Jun 4, 2010 at 1:54 PM, Matthias Felleisen <matthias at ccs.neu.edu> wrote:
>
> On Jun 4, 2010, at 1:45 PM, Sam Tobin-Hochstadt wrote:
>
>> They're one-shot in that they can only be invoked once - after that,
>> they change to do something else.  Consider this implementation of
>> `call/cc':
>>
>> (define (call/cc* f)
>>  (let/cc k
>>    (let* ([v #f]
>>            [k* (lambda (e) (if v (error 'too-many) (begin (set! v #t) (k e)))])
>>      (f k*))))
>>
>> This implements a first-class, full continuation that can only be used
>> once.  You can pass it back out, invoke it from anywhere, but after
>> one use it errors.  That's a one-shot continuation.
>
>
> Please re-read Friedman and Haynes. At a min, run (k* (f k*)).

What is `f' here?
-- 
sam th
samth at ccs.neu.edu


Posted on the users mailing list.