Typed Function and Currying in Scala -
In Scala, I have such a function:
def foo [R] ] (X: string, y: () => R): then I can:
val something: int = foo ("Bar", {() => 13}) Is there any way to use function curry without "losing" the type of second argument? ; nothing) Some Val: int = bar ((=) 13)
case class foo (x: string) AnyVal {def apply [r] (y: (=);): r = y ()} val bar = foo ("bar") Val some: int = Bar ((=) = 13) // int = 13
Comments
Post a Comment