Skip to content

Instantly share code, notes, and snippets.

@SethTisue SethTisue/eta.scala

Created Aug 26, 2015
Embed
What would you like to do?
scala> class C
defined class C
scala> implicit val c = new C
c: C = C@33833882
scala> def foo(x: Int)(implicit c: C) = x + 1
foo: (x: Int)(implicit c: C)Int
scala> foo(3)
res0: Int = 4
scala> List(1, 2, 3).map(foo(_))
res1: List[Int] = List(2, 3, 4)
scala> List(1, 2, 3).map(foo)
res2: List[Int] = List(2, 3, 4)
scala> List(1, 2, 3).map(foo _)
res3: List[Int] = List(2, 3, 4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.