← Back to context

Comment by dan-robertson

5 months ago

I’m not sure that |> operators are the right analogy, but fwiw:

Clojure does either first or last position depending on the operator, and it offers lightweight lambdas similar to your second option

The natural choice for a language like Haskell is final position: the rhs of the |> will be partially applied an |> has type a -> (a -> b) -> b

In R, things go in the last slot I think but most arguments on the right hand side would be passed as keywords so the ‘last’ slot would often be the first argument.

The whole point of Unix pipes is that execution is parallel so I’m not totally sure I get your point about guaranteeing execution order.