When was the "arrow notation" for functions first introduced? When was the "arrow notation" $f: X \to Y$ for functions first introduced? Who introduced it and with which motivation?
I ask this question in order to understand whether it was, in part, this notation to suggest that there could be "higher morphisms" (in analogy with oriented paths and homotopies between them, and homotopies between homotopies and so on), or if it went the other way around (with category theorists first realizing that many constructions involving paths and homotopies thereof in Homotopy Theory could be generalized to other more abstract settings, and then setting up a notation that suggested the analogy "1-morphisms $\sim$ paths").
 A: The Wikipedia article on History of mathematical notation says:

The arrow, e.g., →, was developed for function notation in 1936 by Øystein Ore to denote images of specific elements. Later, in 1940, it took its present form, e.g., f: X → Y, through the work of Witold Hurewicz.

But I have no access to the references.
A: Regarding element-to-element arrows, Emili Bifet writes on The Math Forum that Riemann used the notation $a \to b$ as follows:

Ist $a$ ein Verzweigunspunkt der Loesung einer linearen
  Differentialgleichung zweiter Ordnung und geht, waehrend $x$ sich im
  positiven Sinn um $a$ bewegt, $z_1$ ueber in $z_3$ und $z_2$ in $z_4$, was kurz durch $z_1 \to z_3$ und $z_2 \to z_4$ angedeutet werden soll...

II. Die Integrale einer linearen Differentialgleichung zweiter Ordnung
in einem Verzweigungspunkt. (Aus einer Vorlesung Wintersemester
1856/57.)
Or in translation by Michael Bächtold:

If $a$ is a branching point of the solution to a linear differential equation of second order and, as $x$ moves clockwise around $a$, $z_1$
  goes over to $z_3$ while $z_2$ goes over to $z_4$, what shall be
  denoted with $z_1 \to z_3$ and $z_2 \to z_4$ for short...

