Skip to content

Instantly share code, notes, and snippets.

@dcsobral
Created April 16, 2012 15:51
Show Gist options
  • Save dcsobral/2399607 to your computer and use it in GitHub Desktop.
Save dcsobral/2399607 to your computer and use it in GitHub Desktop.
Forward Pipe of the Future
// This needs to be put inside an object, I think, but SIP13+SIP-15 is not working right now, so I couldn't test it
implicit class ForwardPipe[T](val obj: T) extends AnyVal {
def |> [U](f : T => U) = f(obj)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment