Created
January 25, 2012 12:51
-
-
Save machisuji/1676118 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
| scala> def translate(coord: (Int, Int), str: String) = (coord._1 + 1, coord._2 - 1) -> str | |
| translate: (coord: (Int, Int), str: String)((Int, Int), String) | |
| scala> (1, 1) -> "test" :: Nil map translate | |
| <console>:9: error: type mismatch; | |
| found : ((Int, Int), String) => ((Int, Int), String) | |
| required: ((Int, Int), java.lang.String) => ? | |
| (1, 1) -> "test" :: Nil map translate |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment