
21 Oct
2004
21 Oct
'04
12:12 p.m.
K P SCHUPKE writes:
This is the interface I came up with (and its fairly efficient): data IList a i e = ICons i i (a i e) (IList a i e) | INil
Isn't that an interface for doing fast I/O rather than for writing stream processors? If I look at the consumer:
wc :: List l Word8 => l Word8 -> Char -> Int -> Int -> Int -> (Int,Int,Int)
I don't see how the IList data type would help writing the wc function. Where is the advantage over data CountingState = ST !Bool !Int !Int !Int wc :: Char -> CountingState -> CountingState ...? Peter