pipe is a regular function call which takes a closure, and therefore is highly inefficient for simple things. (The first PR to the Scala library that used it was a refactoring of something simple that unintentionally clobbered performance. The change was caught before going in, IIRC.)
Therefore, its routine use should be discouraged especially in mathematical contexts, so I think the operator version (yes,
|> is the usual one for Scala) is a bad idea.
In Scala 3, it’ll be much easier to make it efficient. We should wait until then.
In the meantime, feel free to use it to simplify heavyweight operations or complex logic where the overhead of an extra closure isn’t significant.
case (yesses, nos) => f(nos.tail, yesses)