S
Sam Kong
Hi,
I'm trying to understand continuation.
There's some confusion in the following:
In top-level,
[1]
callcc { |c| $label = c }
#...some other code here
$label.call
[2]
$label = callcc { |c| c }
#...some other code here
$label.call
Are they same or different?
As I understand it, callcc returns the last expression or return value
of c.call.
Thus, basically [1] and [2] should be same, right?
But I'm not sure.
Can anyone explain it, please?
Thanks.
Sam
I'm trying to understand continuation.
There's some confusion in the following:
In top-level,
[1]
callcc { |c| $label = c }
#...some other code here
$label.call
[2]
$label = callcc { |c| c }
#...some other code here
$label.call
Are they same or different?
As I understand it, callcc returns the last expression or return value
of c.call.
Thus, basically [1] and [2] should be same, right?
But I'm not sure.
Can anyone explain it, please?
Thanks.
Sam