How many filters?

Report a typo

Consider the following snippet:

case class Phone(id: Long, name: String, model: Int)

def getListOfPhones(): List[Phone] = ???
def getDataByPhone(id: Long): List[String] = ???

for
  phone <- getListOfPhones() if phone.model >= 14
  data <- getDataByPhone(phone.id)
  trimmed = data.trim
  if trimmed.nonEmpty
yield data

How many times withFilter is involved in total?

Enter a number
___

Create a free account to access the full topic