Skip to content

Instantly share code, notes, and snippets.

@SteveGilham
Created April 15, 2015 07:37
Show Gist options
  • Save SteveGilham/e9ef541553e09be75994 to your computer and use it in GitHub Desktop.
Save SteveGilham/e9ef541553e09be75994 to your computer and use it in GitHub Desktop.
package operator
object Functional {
class PipedObject[T] private[Functional] (value:T)
{
def |>[R] (f : T => R) = f(this.value)
}
implicit def toPiped[T] (value:T) = new PipedObject[T](value)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment