Home > Software engineering >  What is the type of a lambda expression in Scala
What is the type of a lambda expression in Scala

Time:04-22

Say I had a lambda expression something like: val ex = (x:Int) => x x what is the type of this expression/how do I know its type? I've tried using "Any" as the function parameter type that didn't work and if I try to get it's type using the .getClass.getSimpleName function I get an object address.

CodePudding user response:

The type of this expression is a enter image description here

  • Related