Partial reverse application operator #449

Open
opened 2023-05-13 18:16:47 +09:00 by zxq9 · 0 comments
zxq9 commented 2023-05-13 18:16:47 +09:00 (Migrated from gitlab.com)

Created by: radrow

Currently |> works only on single argument functions, rendering it quite useless in many situations. Following Elixir's approach to it, we could make it only on the first (last?) parameter that is piped:

function i(x) = x
function f(x, y) = x - y
function g(x) = x

21 |> i |> f(37) |> g

which would mean

g(f(i(21), 37))
*Created by: radrow* Currently `|>` works only on single argument functions, rendering it quite useless in many situations. Following Elixir's approach to it, we could make it only on the first (last?) parameter that is piped: ``` function i(x) = x function f(x, y) = x - y function g(x) = x 21 |> i |> f(37) |> g ``` which would mean ``` g(f(i(21), 37)) ```
Sign in to join this conversation.
No Milestone
No project
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: QPQ-AG/sophia#449
No description provided.