Skip to content

Instantly share code, notes, and snippets.

@qharlie
Created October 20, 2013 19:11
Show Gist options
  • Save qharlie/7073881 to your computer and use it in GitHub Desktop.
Save qharlie/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