Lambda use with HOF

Report a typo

Let's do some sequential computations by lambdas. We have a list of names:

val names = List("John", "Smith", "Bob", "Fitzgerald")

Choose the correct lambdas to calculate the sum of the name lengths which are more or equal to 5:

names
  .map(???)
  .filter(???)
  .foldLeft(0)(???)
Select one or more options from the list
___

Create a free account to access the full topic