Repository : ssh://darcs.haskell.org//srv/darcs/packages/base

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/5fd54973176b82778af2f74e3a741830198e15ab

>---------------------------------------------------------------

commit 5fd54973176b82778af2f74e3a741830198e15ab
Author: A. Bram Neijt <[email protected]>
Date:   Sun Apr 22 14:52:00 2012 +0200

    Update documentation of intersectBy
    
    Mention which list is the source
    of the elements in the resulting list.

>---------------------------------------------------------------

 Data/List.hs |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/Data/List.hs b/Data/List.hs
index 9f5001f..7b06dae 100644
--- a/Data/List.hs
+++ b/Data/List.hs
@@ -416,7 +416,8 @@ unionBy eq xs ys        =  xs ++ foldl (flip (deleteBy eq)) 
(nubBy eq ys) xs
 -- > [1,2,2,3,4] `intersect` [6,4,4,2] == [2,2,4]
 --
 -- It is a special case of 'intersectBy', which allows the programmer to
--- supply their own equality test.
+-- supply their own equality test. If the element is found in both the first
+-- and the second list, the element from the first list will be used.
 
 intersect               :: (Eq a) => [a] -> [a] -> [a]
 intersect               =  intersectBy (==)



_______________________________________________
Cvs-libraries mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-libraries

Reply via email to