scala - Converting this function to anonymous function -
how create function returns true if number 5 anonymous function:
def yeah_five(p: int): boolean = p == 5 thanks?
short notation anonymous functions:
(p: int) => (p == 5); long version:
new function1[int] { def apply(p: int): int = p == 5 }
Comments
Post a Comment