1

I am reading the post from What are arrows, and how can I use them? and on the third answer, John Wiegley has mentioned the following:

They are simply abstractions of functions.

What does it mean?

softshipper
  • 32,463
  • 51
  • 192
  • 400

1 Answers1

9

That's not a formal definition, but hints to the fact that the notion of "arrow" is a generalization of the notion of "function". In other words, functions are a special case of arrows, but arrows can also be something else.

An "arrow" is something that shares some features with regular functions, e.g. they have a domain type and a codomain type, they can be composed, there is an "identity arrow" from any type to itself, and so on.

However, not all features of functions are shared by all the arrows. For instance, a function can always be applied to suitable arguments, while that might not be the case for an arrow.

In technical lingo, one can therefore say that the notion of "arrow" is an abstraction, or generalization, of the notion of function.

(Let me add that I somewhat disagree with the "simply" used in your quote. These abstract notions might be trivial after one learns them, but the learning process is not that simple.)

chi
  • 111,837
  • 3
  • 133
  • 218