Closed marcosh closed 2 years ago
I realised it was possible to create a content with a duplicated tag (thanks to Quickstrom...).
To avoid this I decided to still use a List to represent tags but to use a smart constructor to remove duplicates using the nub function.
List
nub
I chose not to use Set mainly because I would have lost the ability to have a Functor and Traversable instance for Content
Set
Functor
Traversable
Content
I realised it was possible to create a content with a duplicated tag (thanks to Quickstrom...).
To avoid this I decided to still use a
List
to represent tags but to use a smart constructor to remove duplicates using thenub
function.I chose not to use
Set
mainly because I would have lost the ability to have aFunctor
andTraversable
instance forContent