[Haskell-beginners] Cannot find cause of space leak
Kim-Ee Yeoh
ky3 at atamo.com
Sat Jan 31 17:03:05 UTC 2015
On Sat, Jan 31, 2015 at 10:39 PM, YCH <dontdieych at gmail.com> wrote:
> ys' = groupByN ys n
> where
> groupByN [] _ = []
> groupByN zs m = take m zs : groupByN (drop m zs) m
>
This groupByN doesn't look like it'll terminate for negative n. So ys'
becomes an infinite list. Which causes divergence downstream.
-- Kim-Ee
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20150201/1cff0b27/attachment.html>
More information about the Beginners
mailing list