Skip to content

Instantly share code, notes, and snippets.

@SethTisue
Created August 26, 2015 18:17
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 SethTisue/95ed00cfc6ef61628c1f to your computer and use it in GitHub Desktop.
Save SethTisue/95ed00cfc6ef61628c1f to your computer and use it in GitHub Desktop.
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