Created
July 27, 2011 07:58
-
-
Save yuroyoro/1108890 to your computer and use it in GitHub Desktop.
たっぷるたっぷる
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| trait TupleOps[A,B,C] { | |
| val tuple:(A,B,C) | |
| def head:A = tuple._1 | |
| def tail:(B,C) = (tuple._2, tuple._3) | |
| } | |
| implicit def tupleOps[A,B,C](t:(A,B,C)) = new TupleOps[A,B,C]{ val tuple = t } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment