ZVON > References > Haskell reference
| Indexes | Syntax | Prelude | Ratio | Complex | Numeric | Ix | Array | >> List << | Maybe | Char | Monad | IO | Directory | System | Time | Locale | CPUTime | Random

Module: List
Function: nubBy
Type: (a -> a -> Bool) -> [a] -> [a]
Description: similar to nub, but it allows the programmers to supply their own equality test
Related: group, groupBy, inits, intersperse, mapAccumL, mapAccumR, nub, partition, sort, sortBy, tails, transpose

Example 1

Input: nubBy (\x y -> x+y == 10) [2,3,5,7,8]

Output: [2,3,5]

Example 2

Input: nubBy (\x y -> x+y == 10) [8,7,5,3,2]

Output: [8,7,5]