Copyright | (c) Eric Mertens 2017 |
---|---|
License | ISC |
Maintainer | emertens@gmail.com |
Safe Haskell | None |
Language | Haskell2010 |
Documentation
allUnique :: Ord a => [a] -> Bool Source #
Predicate that returns true when all elements in the list are unique
>>>
allUnique (words "aa bb cc dd ee")
True>>>
allUnique (words "aa bb cc dd aa")
False>>>
allUnique (words "aa bb cc dd aaa")
True
allUniqueModuloAnagrams :: Ord a => [[a]] -> Bool Source #
Predicate that returns true when all elements in the list are unique when considering anagrams equal to each other.
>>>
allUniqueModuloAnagrams (words "abcde fghij")
True>>>
allUniqueModuloAnagrams (words "abcde xyz ecdab")
False>>>
allUniqueModuloAnagrams (words "a ab abc abd abf abj")
True>>>
allUniqueModuloAnagrams (words "iiii oiii ooii oooi oooo")
True>>>
allUniqueModuloAnagrams (words "oiii ioii iioi iiio")
False