[Pkg-haskell-commits] [SCM] haskell-testpack branch, master, updated. debian/1.0.2-1-4-gb0d6b36
Martin Huschenbett
huschi at gmx.org
Fri Apr 23 15:21:55 UTC 2010
The following commit has been merged in the master branch:
commit c47510fcb728e4e6c1bc680366e76a4574cb2c73
Author: Martin Huschenbett <huschi at gmx.org>
Date: Thu Feb 15 18:29:47 2007 +0100
Improved efficiency of Data.List.Utils.uniq.
diff --git a/src/Data/List/Utils.hs b/src/Data/List/Utils.hs
index da71723..8b25a16 100644
--- a/src/Data/List/Utils.hs
+++ b/src/Data/List/Utils.hs
@@ -471,7 +471,7 @@ the current implementation happens to.
This function is not compatible with infinite lists. -}
uniq :: Eq a => [a] -> [a]
uniq [] = []
-uniq (x:xs) = x : filter (/= x) (uniq xs)
+uniq (x:xs) = x : uniq (filter (/= x) xs)
----- same as
--uniq (x:xs) = x : [y | y <- uniq xs, y /= x]
--
haskell-testpack
More information about the Pkg-haskell-commits
mailing list