The general term for folds is a catamorphism. The general term for unfold is an Anamorphism. Is there an equivalent term for map? I know that a map is a type of fold however restriction is significant. Also it would be useful to have an alternative term to use when the word “map” is ambiguous.
-
2I strongly recommend against the "catamorphism/anamorphism/etc" terminology. "Fold/unfold" is perfectly fine for the "general" case and more likely to be understood. At any rate, if someone doesn't know what "fold/unfold" is (given suitable context), they are unlikely to recognize "catamorophism/anamorphism". – Derek Elkins left SE Dec 06 '17 at 00:33
2 Answers
In addition to being in agreement with Derek (that the ana/cata terminology doesn't bring much to the table) I'll note that the "category theoretic" terminology for the general map
function of type
$$\mathrm{map}:\forall \alpha\beta. (\alpha \rightarrow\beta)\rightarrow(F\ \alpha\rightarrow F\beta) $$
for a functor $F$ is simply "the functorial action of $F$", and is often written as $F$! For example, on lists, map f l
would be written $\mathrm{List}(f)(l)$.
For some reason, computer scientists seem to prefer to have a seperate name for the type constructor and the action on morphisms, but mathematicians do not really consider non-functorial constructors anyways.

- 8,184
- 29
- 62
-
-
-
A separate symbol for the action of a functor on morphisms is needed rather in formal (including programming) languages than in computer science. The natural mathematical language has ambiguities which are inconvenient in a formal language. – beroal Feb 13 '18 at 16:37
I think fmap
, at least in the context of Haskell, is already the general term for the thing it does and the thing you're talking about.
The fact that a map
function also exists, which is basically an fmap
that only works on lists, is mostly a historical accident AFAIK.
Perhaps you're looking for the word Functor
, being the thing that has an fmap
?

- 133
- 9