scala> import scala.util.chaining._
scala> val times6 = (_: Int) * 6
times6: Int => Int = $$Lambda$2023/975629453@17143b3b
scala> val i = (1 - 2 - 3).pipe(times6).pipe(scala.math.abs)
i: Int = 24
Note: (1 - 2 - 3).pipe(times6) may have a small amount of overhead at runtime compared to the equivalent { val temp = 1 - 2 - 3; times6(temp) }.
Type parameters
B
the result type of the function f.
Value parameters
f
the function to apply to the value.
Attributes
Returns
a new value resulting from applying the given function f to this value.