J
John Carter
The excellent article in callcc at
http://www.all-thing.net/Ruby/iterators_generators_and_continuations_in_ruby.html
makes the following statement...
The way to create a continuation is with Kernel#callcc. For what I
imagine are historical reasons, the continuation is passed as an
argument to a block, rather than returned directly. So the idiom to get
a continuation at the current point in the code is this:
c = callcc { |c| c }
Can anyone elaborate on this history?
Or is there a deeper reason than mere history?
Because I find it very confusing.
Thanks
John Carter Phone : (64)(3) 358 6639
Tait Electronics Fax : (64)(3) 359 4632
PO Box 1645 Christchurch Email : (e-mail address removed)
New Zealand
Refactorers do it a little better every time.
http://www.all-thing.net/Ruby/iterators_generators_and_continuations_in_ruby.html
makes the following statement...
The way to create a continuation is with Kernel#callcc. For what I
imagine are historical reasons, the continuation is passed as an
argument to a block, rather than returned directly. So the idiom to get
a continuation at the current point in the code is this:
c = callcc { |c| c }
Can anyone elaborate on this history?
Or is there a deeper reason than mere history?
Because I find it very confusing.
Thanks
John Carter Phone : (64)(3) 358 6639
Tait Electronics Fax : (64)(3) 359 4632
PO Box 1645 Christchurch Email : (e-mail address removed)
New Zealand
Refactorers do it a little better every time.