[Haskell-beginners] Continuations vs. Values
martin
martin.drautzburg at web.de
Sun Sep 7 12:14:22 UTC 2014
Hello all,
in the continuation monad, I can turn a value into a Cont by means of return. Conversely I can convert a Cont into a
value by passing id as the continuation. This dualism of Cont and plain values is well known.
The bind operator kind of(!) takes a value a and produces a new value b. This is all wrapped in Cont stuff, so the
result of bind is not really a plain a, but a Cont which takes a function from b -> r. But this is just the same dualism
as above.
Most Cont examples I've seen could much more easily be implemented with just values or calling functions on values. Then
again there is "a poor man's concurrency" which I don't get at all. In between there is a huge gap of (my) understanding.
Can someone help me cross this gap? There must be certain things I can do with Conts which I cannot do easily with
values and functions.
More information about the Beginners
mailing list