Skip to content

Instantly share code, notes, and snippets.

@djspiewak
Created August 4, 2014 19:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save djspiewak/b76ca9143067a43acba7 to your computer and use it in GitHub Desktop.
Save djspiewak/b76ca9143067a43acba7 to your computer and use it in GitHub Desktop.
object FakeProducts {
implicit def convert2A[A, B](pair: (A, B)): A = pair._1
implicit def convert2B[A, B](pair: (A, B)): B = pair._2
implicit def convert3A[A, B, C](triple: (A, B, C)): A = triple._1
implicit def convert3B[A, B, C](triple: (A, B, C)): B = triple._2
implicit def convert3C[A, B, C](triple: (A, B, C)): C = triple._3
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment