On 7/17/07, Anthony Clayden <[EMAIL PROTECTED]> wrote:
2. The inits . tails approach adds a fault:
   It introduces a sprinkling of empty sub-sequences. These
have sum zero.
   So in case the input list is all negative numbers ...

At least the concatMap inits . tails code that I posted also filtered
empty lists to avoid this problem... it seems like a simple omission
rather than a fault in the approach.

/g

--
The man who'd introduced them didn't much like either of them, though
he acted as if he did, anxious as he was to preserve good relations at
all times. One never knew, after all, now did one now did one now did
one.
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to