3 ms·
This seem to be a discussion of different proposals for adding a "pipeline" operator to JavaScript. A pipeline passes an argument to a function, so foo |>
by goto11 5y ago
This seem to be a discussion of different proposals for adding a "pipeline" operator to JavaScript. A pipeline passes an argument to a function, so
foo |> bar
is the same as
bar(foo)
Better overview here: https://gist.github.com/tabatkins/1261b108b9e6cdab5ad5df4b8021bcb5 https://gist.github.com/tabatkins/1261b108b9e6cdab5ad5df4b80...
The main difference between the proposals seem to be if you should write (F# style):
foo |> bar
or (Hack style):
foo |> bar(#)
F# style is more elegant if the function takes a single argument, but Hack style adapt better when a function takes multiple arguments.
- nsonha 5y agoit was mentioned, by doing that, the proposal steps on another proposal which is partial appliation (using the ? symbol)