--7kD9y3RnPUgTZee0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
What is the purpose of the block passed to callc? Is there a reason
that callcc doesn't just return the Continuation object?
This has been discussed at least once in the past, see the ruby-talk
email archives:
http://www.google.com/search?q=3Dsite:ruby-talk.org+callcc
I will say that call-with-current-continuation cannot work without the
block passed to it. IOW, call (this block of code) with the current
continuation (which gets passed to it as an argument).
x =3D callcc do |cc| ... end
^^
Here || is the "current continuation" for callcc. Without the block,
you can't return here and not do whatever was done in the block. This
is very important, without it you can't do much truly interesting stuff.
--=20
Eric Hodel - (e-mail address removed) -
http://segment7.net
All messages signed with fingerprint:
FEC2 57F1 D465 EB15 5D6E 7C11 332A 551C 796C 9F04
--7kD9y3RnPUgTZee0
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (FreeBSD)
iD8DBQFBdI5AMypVHHlsnwQRAtWOAJ9OFHI5943eawiHoA07V3rXN/gztQCg9Beb
S33sCJOPhMcvvm/63TzTcV8=
=/XQL
-----END PGP SIGNATURE-----
--7kD9y3RnPUgTZee0--