Quizzes
Site Language: English
Українська
English
Русский
Programming Tests
Login
Sign Up
Programming Tests
Theory
Snippets
Papers
Landing
Android
Prices
FAQ
Cosmo Story
Terms and Conditions
Privacy Policy
Cookies Policy
Send Feedback
fold
:
Content language: English
Русский
What will be the result of applying fold to Option in the following code? val number: Option[Int] = Some(3) val noNumber: Option[Int] = None val result1 = number.fold(1)(_ * 3) val result2 = noNumber.fold(1)(_ * 3) println(result1) println(result2)
fold
← Prev
1
Next →
Sign Up Now
or
Subscribe for future quizzes