dups-0.1.0.0

Safe HaskellSafe
LanguageHaskell2010

Dups

Description

Some functions for finding and removing duplicates from lists. Used only as a demo in EDAN40/EDAF40.

Synopsis

Documentation

hasDups :: Eq a => [a] -> Bool Source #

Check if a list contains duplicates.

Examples:

hasDups "abc"

should return False

hasDups "abca"

should return True

removeDups :: Eq a => [a] -> [a] Source #

Remove duplicates from a list, this works just as nub in the Data.List package.

Example:

removeDups "abracadabra"

should return "abrcd"