The floor is magma

4 Likes

With respect to the cancellative property, this paper by Bart Jacobs is relevant. It connects to the notion of affine which has a nice formulation as f () ~ (). For the strong variant of that notion, observe that the square (10) in the paper uses only fmap and pure.

As you observed, no Applicative that permits values with no content (in the sense of empty or toList x = []) is cancellative.

Commutativity is relatively rare outside the Reader-like functors. Another interesting example is Set which is nowadays also implemented in transformers as Select. The implementation details make it particularly challenging to come up with a candidate for a fold.

1 Like