Skip to content

Commit

Permalink
Update rfcs/0148-pipe-operator.md
Browse files Browse the repository at this point in the history
Co-authored-by: Robert Hensing <[email protected]>
  • Loading branch information
piegamesde and roberth committed Jul 21, 2024
1 parent 7e43edf commit 1026104
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rfcs/0148-pipe-operator.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,8 @@ having `<|` weaker than `|>` like Haskell's `$` and `&` would be a bad idea.
## Change the `pipe` function signature

There are many equivalent ways to declare this function, instead of just using the current design.
For example, one could flip its arguments to allow a partially-applied point-free style (see above).
One could also make this a single-argument function so that it only takes the list as argument.
For example, one could flip its arguments so that it becomes function composition on list of functions.
Not only can this function trivially replace pipe; it can also be readily used where a function is expected, such as in `map`.

The current design of `pipe` has the advantage that its asymmetry points at its operating direction, which is quite valuable.

Expand Down

0 comments on commit 1026104

Please sign in to comment.