G'day all.

Quoting Tomasz Zielonka <[EMAIL PROTECTED]>:

> 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.

Andrew Bromage
Haskell mailing list

Reply via email to