Skip to content

Commit 314f798

Browse files
committed
Merge pull request #101 from treeowl/zipdocfix
Fix efficiency claim for zipWith.
2 parents ddf4e4a + 107ec12 commit 314f798

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Data/Sequence.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1872,9 +1872,9 @@ reverseNode f (Node3 s a b c) = Node3 s (f c) (f b) (f a)
18721872
-- them up further and zip them with their matching pieces can be delayed until
18731873
-- they're actually needed. We do the same thing for Digits (splitting into
18741874
-- between one and four pieces) and Nodes (splitting into two or three). The
1875-
-- ultimate result is that we can index, or split at, any location in zs in
1876-
-- O(log(min{i,n-i})) time *immediately*, with only a constant-factor slowdown
1877-
-- as thunks are forced along the path.
1875+
-- ultimate result is that we can index into, or split at, any location in zs
1876+
-- in O((log(min{i,n-i}))^2) time *immediately*, while still being able to
1877+
-- force all the thunks in O(n) time.
18781878
--
18791879
-- Benchmark info, and alternatives:
18801880
--

0 commit comments

Comments
 (0)