On 03/07/2012 09:05 PM, Orchid Win7 v1 wrote:
> This is unfortunately O(n^2). But the trixy incantation
>
> fibs = 1 : 1 : zipWith (+) fibs (tail fibs)
>
> is only O(n). And it works exactly /because/ of laziness. Otherwise,
> this would be an infinite loop which would never end.
...as opposed to those infinite loops that end after a while. o_O
Post a reply to this message
|