[Haskell-cafe] Re: Is this haskelly enough? -- errm but every answer is wrong(?)

Aaron Denney wnoise at ofb.net
Tue Jul 17 22:15:55 EDT 2007


On 2007-07-18, Anthony Clayden <anthony_clayden at clear.net.nz> wrote:
> (Or at least the problem is under-specified.)
> 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 ...

Why is this a fault?  The subsequence with maximum sum is then the empty
subsequence.  Perfectly accurate.

-- 
Aaron Denney
-><-



More information about the Haskell-Cafe mailing list