Hi gurus and nubys,
I'm trying to get a grip on continuations.
I can understand why we have
callcc &block
Reading some stuff on continuations from scheme's documentation this
is quite clear.
Btw, I wonder what's wrong with a more rubyish way to use
continuations.
the sample from ri :
arr = [ "Freddie", "Herbie", "Ron", "Max", "Ringo" ]
callcc{|$cc|}
puts(message = arr.shift)
$cc.call unless message =~ /Max/
To me this seem crying to become:
arr = [ "Freddie", "Herbie", "Ron", "Max", "Ringo" ]
cc= Continuation.new # optional &blk
puts(message = arr.shift)
cc.call unless message =~ /Max/
probably I'm just dumb and I can't really get Continuations..