Skip to content

Instantly share code, notes, and snippets.

@davidallsopp
Created April 6, 2014 19:48
Show Gist options
  • Save davidallsopp/777680b92b4cf7c5f468 to your computer and use it in GitHub Desktop.
Save davidallsopp/777680b92b4cf7c5f468 to your computer and use it in GitHub Desktop.
implicit class Crossable[X](xs: Traversable[X]) {
def cross[Y](ys: Traversable[Y]) = for { x <- xs; y <- ys } yield (x, y)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment