Looks like the same approach used in Haskell’s HoleyMonoid library, which is also used to implement the excellent formatting lib.
Yes, it’s exactly the same, and directly inspired by the latter. :-)
Looks like the same approach used in Haskell’s HoleyMonoid library, which is also used to implement the excellent formatting lib.
Yes, it’s exactly the same, and directly inspired by the latter. :-)