I shall copy this discussion in our Java8 forum.
The arrow is part of the syntax of a λ. You know you write λ
x •
x + 2 and that means that (λ
x •
x + 2)
y will evaluate to
y + 2? Well, you cannot write • because there isn't a • key on most keyboards, not even with AltGr. So they came up with a new operator using two keystrokes which are usually found on keyboards − and >.
The part before the • goes to the left of the -> in () but you can omit the () if there is only one argument. Then the arrow token replaces the •. Then the remainder goes afterwards. So my λ
x •
x + 2 comes out as x -> x + 2
By the way: how do people pronounce -> when reading out code? I have never seen it anywhere.
Edit: additional link to
maths tutorial as PDF.