
5 Sep
2010
5 Sep
'10
3:39 a.m.
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.