Skip to content

Instantly share code, notes, and snippets.

@ThomasKruegl
Created March 27, 2018 13:10
Show Gist options
  • Save ThomasKruegl/5c7dc860ff693d01c8a812e192f64cd7 to your computer and use it in GitHub Desktop.
Save ThomasKruegl/5c7dc860ff693d01c8a812e192f64cd7 to your computer and use it in GitHub Desktop.
val bar: Option[() => String] = Option(() => "five")
val matchResult: String = bar match {
case Some(a) => a()
case None => "None"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment