[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Scheme-reports] Technical question



On Fri 27 May 2011 01:06, Jay Reynolds Freeman <jay_reynolds_freeman@x> writes:

> One could argue that the continuation k which is to receive the
> three values 1, 2, and 3, is within the body of the unnamed lambda
> expression
>
>     (lambda ()
>       (call-with-current-continuation (lambda (k) (k 1 2 3)))
>       ;;
>       ;; <-- continuation k is right here, so to speak
>       ;;
>       )

You'd be wrong :)  This call/cc is in tail position.  The captured
continuation is that of the invocation of the outer `lambda'
expression.

Andy
-- 
http://wingolog.org/

_______________________________________________
Scheme-reports mailing list
Scheme-reports@x
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports