> big memory leak ... two parsers in sequence
A related question, are these two equivalents?
foldl2 f g y z lst = (foldl f y lst, foldl g z lst)
foldl2' f g y z lst = foldl (\(i, j) x -> (f i x, g j x)) (y, z) lst
If no, is there some strictness that can be added to make them
equivalent? And if so, could a compiler
make this optimization as to avoid these sorts of space leaks?
Thanks,
Greg