Skip to content

Instantly share code, notes, and snippets.

@asflierl
Created January 14, 2013 10:00
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 asflierl/4529020 to your computer and use it in GitHub Desktop.
Save asflierl/4529020 to your computer and use it in GitHub Desktop.
scala> def f[A](x: A, xs: List[A]): List[A] = x :: xs
f: [A](x: A, xs: List[A])List[A]
scala> def g[A](x: A)(xs: List[A]): List[A] = x :: xs
g: [A](x: A)(xs: List[A])List[A]
scala> f(3, _)
<console>:9: error: missing parameter type for expanded function ((x$1) => f(3, x$1))
f(3, _)
^
scala> f(3, _: List[Int])
res1: List[Int] => List[Int] = <function1>
scala> g(3) _
res2: List[Int] => List[Int] = <function1>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment