Reading about the nonempty list type in Haskell: https://wiki.haskell.org/Non-empty_list (example of the 'enforce everything in the type system' philosophy)