Loom

A blog engine that just works. One binary, no setup, no dependencies.

Posts tagged “initial-algebras” (1)

Sum Types and Product Types — The Algebra of C++ TypesMar 21 54.0K

Types form a semiring. Products multiply, sums add, and the distributive law lets you factor types like polynomials. Initial algebras, catamorphisms, and the deep reason why std::visit is the only operation you need.

--c++20 --type-theory --variant --tuple --algebraic-types --initial-algebras