Skip to content

Instantly share code, notes, and snippets.

@manning79
Created October 20, 2013 19:11
Show Gist options
  • Select an option

  • Save manning79/7073881 to your computer and use it in GitHub Desktop.

Select an option

Save manning79/7073881 to your computer and use it in GitHub Desktop.
def map2_1[A,B,C](a: Option[A], b: Option[B])(f: (A, B) => C): Option[C] =
for {
a1 <- a
b1 <- b
} yield f(a1,b1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment