Add NonEmptyMap and NonEmptySet to containers

Andreas Abel abela at
Fri Sep 20 05:13:43 UTC 2019

I think the origin of the suffix 1 is e.g. the function

   foldr1 :: (a -> a -> a) -> [a] -> a

which is a fold for non-empty lists only.

That use of "1" might be older than the use of "1" for order-1 type 

On 2019-09-20 03:56, Ruben Astudillo wrote:
> On 19-09-19 22:17, Alexandre Esteves wrote:
>> I do like the sound of `instance Foldable1 Set1` more than I do
>> `instance NonEmptyFoldable NonEmptySet`
>> <>
> I prefer it too, I just wish (future) documentation included a little
> explanation on why the suffix 1 was put.

Andreas Abel  <><      Du bist der geliebte Mensch.

Department of Computer Science and Engineering
Chalmers and Gothenburg University, Sweden

andreas.abel at

More information about the Libraries mailing list