|
|
|
|
|
by larve
1292 days ago
|
|
I'm not entirely sure if that is what you are asking, but for example pure functions from a type A to a type B can be compose with pure functions from a type B to a type C, to form a pure function from A to C. A lot of programmer oriented CT takes place in the category of types, with morphisms being a function from one type to another. Programming in a purely functional style makes composition of functions... trivial, compared to a function that has side-effects due to mutation. Now of course this sounds trivial, but you can build much more refined concepts out of that simple idea. For example, creating product and sum types. And that's where the rabbit hole starts. |
|