
On Thu, 18 Apr 2019, John Cotton Ericson wrote:
In https://github.com/haskell/containers/issues/608 I proposed adding non-empty variants of Map and Set, analogous to Data.List.NonEmpty for List, to containers. semigroupoids demonstrates the many uses and structure of non-empty containers in general, and libraries such as https://github.com/mstksg/nonempty-containers and https://github.com/andrewthad/non-empty-containers demonstrate the interest in non-empty maps and sets in particular.
I have also my implementations: https://hackage.haskell.org/package/non-empty-0.3.1/docs/Data-NonEmpty-Set.h... https://hackage.haskell.org/package/non-empty-0.3.1/docs/Data-NonEmpty-Map.h... Interesting to know, that the implementation in containers could already provide this functionality with little changes.