30 Avr
2008
30 Avr
'08
01:20
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