Joseph Goguen’s paper “An Introduction to Algebraic Semiotics, with Application to User Interface Design” gives an interesting (and idiosyncratic) perspective on this, using simple examples like a UI for a clock or a line-oriented text editor.
I’d expect there are common examples you see of this all the time in the wild. Very mundane examples include ^
, &&
, ||
, +
, and *
, which are all very good functions, in my book, and gain much for their goodness from being operators in their respective monoids. Of course, any library that exposes a monadic API (like Lwt or Async) or an applicative interface (like Cmdliner) is also leveraging this kind of approach.