News for hackers. Stuff that matters.
Re:Pipelining might be my favorite programming language feature by AdieuToLogic on Monday April 21, 2025 @09:02PM (#43758145)
> I would be lying if I didn't secretly wish that all languages adopted the `|>` syntax from Elixir.

This is usually the Thrush combinator[0], exists in other languages as well, and can be informally defined as:

  f(g(x)) = g(x) |> f
0 - https://leanpub.com/combinators/read#leanpub-auto-the-thrush
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.