[Haskell-beginners] Cannot find cause of space leak

YCH dontdieych at gmail.com
Sat Jan 31 17:10:00 UTC 2015


2015. 2. 1. 오전 2:03에 "Kim-Ee Yeoh" <ky3 at atamo.com>님이 작성:
>
>
> 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

Thanks, Kim-Ee. Now I can see.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20150201/e34442f9/attachment.html>


More information about the Beginners mailing list