[MSLUG] Concerns about the behavior of call/cc

Benoit Fraikin b.fraikin at usherbrooke.ca
Wed Apr 30 23:43:16 EDT 2008


Thank you.

This explains clearly why I have such an error.

Benoît Fraikin

On 08-04-30, at 01:20, Stefan Monnier wrote:
>> 2.2- this means: try to execute (lambda (k)(exit k))
>>       where k is the continuation (lambda (v) (apply v '(1 2 3))
>
> Actually, the continuation k is more like
>
>    (lambda (v) (exit (apply v '(1 2 3))))
>
> Because if the argument to call/cc does not call the continuation
> explicitly and instead just returns a value, that value is then passed
> to the continuation.  I.e.
>
>  (call/cc (lambda (v) e))
>
> is really more like
>
>  (call/cc (lambda (v) (v e)))
>
> This is not inherent to the notion of continuation, it just happens to
> be the way the call/cc in Scheme was chosen to work.
>
>
>         Stefan
>


More information about the MSLUG mailing list