
On 12/04/11 02:25, Stephen Tetley wrote:
Umm, an obvious point is that if you really are using lists as streams they should appear infinite to the processing code, so you shouldn't encounter operations that fail due to incompatible lengths.
Didn't explain myself quite right, I guess. The lists are infinite; however, when a function (which doesn't call `filter`) produces more than one list, the two lists are related in that the nth elements of each list came from the same source. Pairing every nth element is meaningfull for two such lists/streams. In contrast, a list coming out of `filter` isn't related to the list going in in this way, and shouldn't be re-paired with that list (or a direct derivative). My goal, again, is to represent that distinction in the type system. -- Scott Lawrence