Factoring through objects: subtyping, Unit, Void, Product, Sum

This is an article I wanted to write for some time, it’s mostly a showcase of using the idea of “factoring through” from abstract algebra with examples. It’s useful for turning regular functions into constants and coconstants, implementing case splitting and building tuples.

https://muratkasimov.art/Ya/Articles/Factoring-through-objects/

1 Like