Skip to content
  • Erik de Castro Lopo's avatar
    Cabal: Add a NubList type with tests. · f9381a60
    Erik de Castro Lopo authored
    A NubList is a list where all elements are unique, but are maintained in
    their original order. The Monoid NubList's mappend implement is just:
    
        NubList xs `mappend` NubList ys = NubList . nub $ xs ++ ys
    
    which preserves NubList's required properties (ordering and unique-ness
    of elements) and meets the requirements of the Monoid laws (identity,
    associativity and closure).
    f9381a60