3 ms·
Functors are functors, natural transformations are natural transformations; neither has much in common with classes, methods or interfaces. Functors are being u
by lmm 9y ago
Functors are functors, natural transformations are natural transformations; neither has much in common with classes, methods or interfaces. Functors are being used to achieve composition here, but the use of functors is an essential part of the pattern; talking about "composition-oriented programming" would be vague to the point of meaninglessness (every programmer believes they're being compositional), and there simply isn't an OO equivalent of open recursive types as far as I know.