Created
April 16, 2012 15:51
-
-
Save dcsobral/2399607 to your computer and use it in GitHub Desktop.
Forward Pipe of the Future
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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