Complete the code to create a lambda that adds two numbers.
val sum = { a: Int, b: Int -> a [1] b }The lambda uses the plus operator + to add two numbers.
Complete the code to filter a list using a lambda that keeps even numbers.
val evens = numbers.filter { [1] % 2 == 0 }it parameter.The implicit lambda parameter it represents each element in the list.
Fix the error in the lambda that multiplies each number by 2.
val doubled = numbers.map { [1] * 2 }it for single-parameter lambdas.The lambda uses the implicit parameter it to refer to each element.
Fill both blanks to create a lambda that filters words longer than 3 letters.
val longWords = words.filter { word -> word.[1] > [2] }size which is not a string property.The property length gives the number of letters in a word, and we compare it to 3.
Fill all three blanks to create a map of word lengths for words longer than 4 letters.
val wordLengths = words.filter { [1] -> [1].[2] > [3] }.associateWith { it.length }size which is not a string property.Use w as the lambda parameter, length to get string length, and compare to 4.
