Wed Jan 19 19:06:59 EST 2011
- Can we just use "join"? I suppose a 2-level monad wrapping would
then just be joining dictionaries.
I'm not so happy with the loss of generality when `bindN' makes code
explicit. Maybe this is solved somewhere else with type classes and
that's where I get the idea in the first place?
I think I'm missing the point here: the retN operator is the
let-insertion operator and intended to be different from return.
It's explained better in .
- Explain this state/continuation business again. From the intuitive
point the continuation is there to be able to patch into values
passing from one computation to another. At those inspection points
`let' bindings can be inserted, as part of the `bind' or `return'
functions that make up the plumbing.
- Is it really necessary to make a fully-serialized version? For
monads it seems it is. This does away with the simple pure function
approach I had before. A function that has sharing will always have
a monadic return type. However, if just the behaviour is desired
and not the sharing structure, it might be straightforward to
flatten the result to a pure function and get to the same point.
Anyway. The Monad/CPS approach does feel rather clumsy.