Created
October 28, 2011 13:28
-
-
Save notyy/1322257 to your computer and use it in GitHub Desktop.
cant infer
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
def newMap[A,B](x:A, f: A => B): B = { | |
f(x) | |
} | |
scala> newMap(1:Int,(_*2)) | |
<console>:9: error: missing parameter type for expanded function ((x$1) => x$1.$times(2)) | |
newMap(1:Int,(_*2)) | |
^ | |
scala> newMap(1,((_:Int)*2)) | |
res7: Int = 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment