Non empty data structures are easier to work with. They can easily be
made "empty" by wrapping them in a Maybe and the benefits of being
able to remove empty expectations from the core data structure increase
usability downstream.
The underlying data structure for Trie is not NonEmpty, so this
invariant must be held by operations over it.
Non empty data structures are easier to work with. They can easily be made "empty" by wrapping them in a
Maybe
and the benefits of being able to remove empty expectations from the core data structure increase usability downstream.The underlying data structure for
Trie
is notNonEmpty
, so this invariant must be held by operations over it.