I have seen the -> operator/symbol in Java 8 predicates recently and wondered what its name is. I know that it is used in lambda expressions, but I know that the symbol for lambda is λ, so that's not it.

Any ideas?

有帮助吗?

解决方案

It's called arrow token

Here on wiki, this article and that article or even on java website

Many years ago, before there were any computers, the logician Alonzo Church wanted to formalize what it means for a mathematical function to be effectively computable. (Curiously, there are functions that are known to exist, but nobody knows how to compute their values.) He used the Greek letter lambda (λ) to mark parameters.

Why the letter λ? Did Church run out of other letters of the alphabet? Actually, the venerable Principia Mathematica used the ˆ accent to denote free variables, which inspired Church to use an uppercase lambda (Λ) for parameters. But in the end, he switched to the lowercase version. Ever since, an expression with parameter variables has been called a "lambda expression."

Reference here

许可以下: CC-BY-SA归因
scroll top