3 ms·
> Are you able to define the method over arbitrary data types? Yes exactly, which is why it is not equivalent. No macro needed here. In Scala 2 syntax: ``` im
by valenterry 1y ago
> Are you able to define the method over arbitrary data types?
Yes exactly, which is why it is not equivalent. No macro needed here. In Scala 2 syntax:
```
implicit class AnyOps[A](private val a: A) extends AnyVal {
def |>[B](f: A => B) = f(a)
}
```