Speeding up Data.List.inits
Henning Thielemann
schlepptop at henning-thielemann.de
Sat Jul 19 08:49:04 UTC 2014
Am 19.07.2014 10:45, schrieb David Feuer:
> I don't really see how recursing into some other inits function would
> help. The same laziness requirement should hold everywhere:
>
> take (n+1) $ inits ([1 .. n] ++ undefined) = inits [1 .. n]
>
> Maybe I don't understand what you mean properly.
I wrote my own initsDL (with different name) and in the recursive call
did not call initsDL but accidentally initsR (with different name), thus
initsDL became essentially initsR except for the first recursion step.
More information about the Libraries
mailing list