You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Instead of writing extra function wrappers for passing arguments, the operator can always make sure the output from previous function as fed as the first argument of next function.
constnewScore=score|>double// output of `score` is first argument: `double(10)`|>add(7)// output of `double(10)` is first argument: `add(20, 7)`console.log(newScore);// 27
Currently
The spec suggests function with multiple arguments be used like this:
Base functions:
Pipe operator usage:
Proposed change
Instead of writing extra function wrappers for passing arguments, the operator can always make sure the output from previous function as fed as the first argument of next function.
This is how Elixir works: https://hexdocs.pm/elixir/Kernel.html#%7C%3E/2
If TC39 is interested in this, I am happy to send a PR for improving this spec further.
The text was updated successfully, but these errors were encountered: