Your statement lambda
param -> { return expression; }
can be changed to an expression lambda:
param -> expression
Simple, isn’t it? Note, that the curly brackets and the semicolon need to be removed.
Your statement lambda
param -> { return expression; }
can be changed to an expression lambda:
param -> expression
Simple, isn’t it? Note, that the curly brackets and the semicolon need to be removed.