unfold_example1
val failable: Int => Option[Int] = { | |
(n: Int) => | |
n match { | |
case n if 0 until 100 contains n => Some(n + 1) | |
case otherwise => None | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment