[commit: packages/containers] changelog-foldtree, cleaned_bugfix394, master, merge-doc-target, merge-fixes-5.9, merge-restrict-fix-5.8, revert-184-generic, revert-408-bugfix_394: Fix performance of Data.Sequence.filter (fixes #176) (199e1ce)
git at git.haskell.org
git at git.haskell.org
Mon Apr 17 21:39:33 UTC 2017
- Previous message: [commit: packages/containers] changelog-foldtree, cleaned_bugfix394, master, merge-doc-target, merge-fixes-5.9, merge-restrict-fix-5.8, revert-184-generic, revert-408-bugfix_394: Merge pull request #191 from monkey-mas/remove-wrong-document-related-to-bounded-balance-tree (0abd9a0)
- Next message: [commit: packages/containers] changelog-foldtree, cleaned_bugfix394, master, merge-doc-target, merge-fixes-5.9, merge-restrict-fix-5.8, revert-184-generic, revert-408-bugfix_394: Merge pull request #193 from fpco/176-better-seq-filter (509d598)
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Repository : ssh://git@git.haskell.org/containers
On branches: changelog-foldtree,cleaned_bugfix394,master,merge-doc-target,merge-fixes-5.9,merge-restrict-fix-5.8,revert-184-generic,revert-408-bugfix_394
Link : http://git.haskell.org/packages/containers.git/commitdiff/199e1ce65a13d67e89a30dd6b7aa0bc0a6a4f734
>---------------------------------------------------------------
commit 199e1ce65a13d67e89a30dd6b7aa0bc0a6a4f734
Author: Michael Snoyman <michael at snoyman.com>
Date: Thu Mar 31 20:16:56 2016 +0300
Fix performance of Data.Sequence.filter (fixes #176)
>---------------------------------------------------------------
199e1ce65a13d67e89a30dd6b7aa0bc0a6a4f734
Data/Sequence.hs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Data/Sequence.hs b/Data/Sequence.hs
index 89616b6..c0986e5 100644
--- a/Data/Sequence.hs
+++ b/Data/Sequence.hs
@@ -2130,7 +2130,7 @@ partition p = foldl part (empty, empty)
-- @xs@ and returns a sequence of those elements which satisfy the
-- predicate.
filter :: (a -> Bool) -> Seq a -> Seq a
-filter p = foldl (\ xs x -> if p x then xs |> x else xs) empty
+filter p = foldl' (\ xs x -> if p x then xs |> x else xs) empty
-- Indexing sequences
- Previous message: [commit: packages/containers] changelog-foldtree, cleaned_bugfix394, master, merge-doc-target, merge-fixes-5.9, merge-restrict-fix-5.8, revert-184-generic, revert-408-bugfix_394: Merge pull request #191 from monkey-mas/remove-wrong-document-related-to-bounded-balance-tree (0abd9a0)
- Next message: [commit: packages/containers] changelog-foldtree, cleaned_bugfix394, master, merge-doc-target, merge-fixes-5.9, merge-restrict-fix-5.8, revert-184-generic, revert-408-bugfix_394: Merge pull request #193 from fpco/176-better-seq-filter (509d598)
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the ghc-commits
mailing list