On the general notion of continuations, I believe Matt Might's blog explains
it quite well using Javascript.
http://matt.might.net/articles/by-example-continuation-passing-style/
In the way of a simple example, he suggests that instead of writing
function id(x) {
return x ;
}
a CPS version
Ozgur Akgun wrote:
On 1 October 2011 11:55, Yves Parès limestr...@gmail.com wrote:
BTW Heinrich, the
evalState (sequence . repeat . State $ \s - (s,s+1)) 0
at the end doesn't work anymore. It should be replaced by :
evalState (sequence . repeat . StateT $ \s - Identity (s,s+1)) 0
Or
Hi,
Can someone please give me a _lucid_ and _simple_ explanation of exactly how
continuations can be used in Haskell?
I've already had a look at most of the tutorials and explanations on the web,
but I'm still confused. Continuations and CPS have me baffled. (I have most of
the Haskell
Mark Spezzano wrote:
Can someone please give me a _lucid_ and _simple_ explanation of
exactly how continuations can be used in Haskell?
I've already had a look at most of the tutorials and explanations on
the web, but I'm still confused. Continuations and CPS have me
baffled. (I have most of
Hi Heinrich,
I'm really looking to use the Cont monad itself--but the link you gave me is
also helpful, so thank you.
If anyone else has words of wisdom to add to this thread please feel free to
pitch in.
Thanks,
Mark
On 01/10/2011, at 5:08 PM, Heinrich Apfelmus wrote:
Mark Spezzano
Having worked with the operational-package, I only can recommend it. In fact
I was trying to do the same thing you are now.
The only thing is that operational needs the use of GADTs, which come as an
extension, but still are a useful and heavily used feature.
BTW Heinrich, the
evalState
Hi.
On 1 October 2011 11:55, Yves Parès limestr...@gmail.com wrote:
BTW Heinrich, the
evalState (sequence . repeat . State $ \s - (s,s+1)) 0
at the end doesn't work anymore. It should be replaced by :
evalState (sequence . repeat . StateT $ \s - Identity (s,s+1)) 0
Or equivalently:
Hello,
Oleg has a introduction for delimited continuations which he presented
during ICFP:
http://okmij.org/ftp/continuations/index.html#tutorial
Of course, it's worth mentioning that the Cont monad is actually doing
delimited continuations, cf.: