Free Monoids in Haskell

1 · Edward Kmett · Feb. 21, 2015, 11 p.m.
It is often stated that Foldable is effectively the toList class. However, this turns out to be wrong. The real fundamental member of Foldable is foldMap (which should look suspiciously like traverse, incidentally). To understand exactly why this is, it helps to understand another surprising fact: lists are not free monoids in Haskell. This latter fact [...]...