Skip to content

Instantly share code, notes, and snippets.

@windymelt
Last active August 29, 2015 13:56
Show Gist options
  • Save windymelt/8886340 to your computer and use it in GitHub Desktop.
Save windymelt/8886340 to your computer and use it in GitHub Desktop.
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