Hulk SMASH: re-imagining the Maybe-monad and its design space
summary
Claim: the Maybe monad encodes pointed spaces and supports wedge and smash product constructions in a discrete Haskell setting. Uses category theory (pointed objects, quotients), basic algebraic topology visualizations and type arithmetic to show the pointed product, coproduct and smash correspond to 1 + a + b + ab, 1 + a + b and 1 + ab respectively. Surprising finding: these (the These type) is a pointed-product encoding equivalent to the usual pair encoding. A public package named smash implements the calculus and functions as expected.
AI-written summary · about
