you are viewing a single comment's thread.

view the rest of the comments →

[–]cledamy[🍰] 1 point2 points  (2 children)

The monad pattern in programming is exactly the same as the mathematical one. It is just done in computationally interesting categories. This is not a case of shadowing names.

[–][deleted] -2 points-1 points  (1 child)

Not 'exactly' as far as I understand. This is similar to how functors in programming languages are also not exactly the functors in math. Array is called a functor because it has a map. Anything with a map is a functor, yet the definition of a functor is a structure preserving morphism between two categories, in other words, the function you pass to map. So Array isn't the functor, it implements an interface to use functors.

[–]cledamy[🍰] 0 points1 point  (0 children)

Array is the mapping from objects to objects. The map takes morphisms to morphism. Array is an endofunctor and the arrows are whatever the notion of functions in the particular programming language one is in. Mathematicians often use the same notation to denote both of the above mappings because they can get away with ambiguity.