Skip to content

Instantly share code, notes, and snippets.

@jamesgolick
Created February 11, 2011 21:27
Show Gist options
  • Select an option

  • Save jamesgolick/823070 to your computer and use it in GitHub Desktop.

Select an option

Save jamesgolick/823070 to your computer and use it in GitHub Desktop.
class Tapper[A](tapMe: A) {
def tap(f: (A) => Unit): A = {
f(tapMe)
tapMe
}
}
object Tap {
implicit def any2Tapper[A](toTap: A): Tapper[A] = new Tapper(toTap)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment