A simple Lambda use case

Report a typo

Use lambda to return only even numbers from the input:

val condition: Int => Boolean = ???

Sample Input 1:

List(1, 2, 3, 4, 5)

Sample Output 1:

List(2, 4)
Write a program in Scala 3
// Define your lambda here
val condition: Int => Boolean = ???

Create a free account to access the full topic