[Haskell-cafe] Unique monad?
jason.dusek at gmail.com
Tue Mar 31 00:50:22 EDT 2009
2009/03/30 Edward Kmett <ekmett at gmail.com>:
> The main issue with generalizing consumption of input is what
> does it entail? when you are parsing a list do you have one
> element at a time consumption? or do you have the ability to
> grab a whole prefix at once? These issues tend to push you
> towards the use of the State monad anyways.
You could approach that by stacking a supplier of prefixes on
top of a supplier of elements (the first supplier supplies
`a`, the second supplies `[a]`). That particular case doesn't
force us out of generalized consumption as long as we are
interested in stacking consumption.
More information about the Haskell-Cafe