Also any half decent binary format should tell you how long the list
is *before* you parse it, either:

1) How many elements it has - for this you just need a counting
version of the many combinator.

2) The length of bytes that the flattened list takes. In this case the
repeating combinator has to test length remaining before deciding
whether to parse the next element.

Neither should need exceptions.
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to