Closed ruuda closed 7 years ago
Indeed, I will look into this later. Also found this in Data.PQueue.Prio.Max:
-- | /O(n log n)/. Equivalent to 'toAscList'.
[..]
toList = toDescList
When fixing the complexity i trusted the original authors annotations on the basic fold* operations, as the erroneous documentation can be explained by bad copy-pasting in these few instances. I have not tested properly via benchmark.
I'll make a new release for the next ghc version.
Thanks!
Quoting the documentation of version 1.3.2:
Something here is not correct. Also,
toListU
does not mention its complexity at all. ShouldtoListU
be O(n) andtoList
a synonym fortoAscList
?