3 ms·
The struct solution is a design pattern for creating a sum type. The lambda solution is a factory for creating any sum type as long as the parameter in each lam
by humanrebar 9y ago
The struct solution is a design pattern for creating a sum type. The lambda solution is a factory for creating any sum type as long as the parameter in each lambda is unique.
Among other things, it's a design with weaker coupling.