
31 Mar
2009
31 Mar
'09
12:50 a.m.
2009/03/30 Edward Kmett
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. -- Jason Dusek