From 1c8533f1b41fdabe58e4a2d09d193105a95ebd98 Mon Sep 17 00:00:00 2001 From: "A. Bram Neijt" Date: Sun, 22 Apr 2012 14:52:00 +0200 Subject: [PATCH] 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 (==) -- 1.7.5.4