Comment

Comment by AdieuToLogic

It seems to me what the author desires is linguistic support for the Thrush combinator[0]. Another colloquial name for it is "the pipe operator."

Essentially, what this combinator does is allow expressing a nested invocation such as:

  f(g(h(x)))
To be instead:

  h(x) |> g |> f
For languages which support defining infix operators.

EDIT:

For languages which do not support defining infix operators, there is often a functor method named `andThen` which serves the same purpose. For example:

  h(x).andThen(g).andThen(f)
0 - https://leanpub.com/combinators/read#leanpub-auto-the-thrush

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton