matterhorn-50200.12.0: Terminal client for the Mattermost chat system
Safe HaskellNone
LanguageHaskell2010

Matterhorn.Util

Synopsis
  • nubOn :: Ord b => (a -> b) -> [a] -> [a]

Documentation

nubOn :: Ord b => (a -> b) -> [a] -> [a] Source #

The nubOn function removes duplicate elements from a list. In particular, it keeps only the last occurrence of each element. The equality of two elements in a call to nub f is determined using f x == f y, and the resulting elements must have an Ord instance in order to make this function more efficient.