What will be the result of calling method exists on empty Option?
val a = None

a.exists(_ == "text")
Explanation
exists is defined in a following way:
final def exists(p: (A) => Boolean): Boolean
Returns true if this option is nonempty and the predicate p returns true when applied to this Option's value.

Следи за CodeGalaxy

Мобильное приложение Beta

Get it on Google Play
Обратная Связь
Продолжайте изучать
тесты по Scala
Cosmo
Зарегистрируйся сейчас
или Подпишись на будущие тесты