no continuations
ajb at spamcop.net
ajb at spamcop.net
Tue Dec 30 22:31:57 EST 2003
G'day all.
Quoting Tomasz Zielonka <t.zielonka at students.mimuw.edu.pl>:
> BTW, the factorial example on
> http://www.haskell.org/hawiki/MonadicContinuationPassingStyle
> seems rather pointless to me, because it doesn't use any methods
> of MonadCont (like callCC).
The only point of the factorial example is to show how much nicer it
looks than the version in ContinuationPassingStyle. Which is useless
from the point of view of expressivity, but it does show how CPS and
recursion can work together.
There are reasons for using CPS as an implementation technique which
have nothing to do with call/cc, though this example doesn't really
show any of them.
Cheers,
Andrew Bromage
More information about the Haskell
mailing list