Re:Pipelining might be my favorite programming language feature
by Munksgaard on Tuesday April 22, 2025 @01:42AM
(#43759363)
Not quite. Note that the Elixir pipe puts the left hand of the pipe as the first argument in the right-hand function. E.g.
x |> f(y) = f(x, y)
As a result, the Elixir variant cannot be defined as a well-typed function, but must be a macro.
This is usually the Thrush combinator[0], exists in other languages as well, and can be informally defined as:
0 - https://leanpub.com/combinators/read#leanpub-auto-the-thrush