Design for Something Like FLIP To Reverse Arguments

The design of a FLIP-like operation raises some questions.

If it were an operator that acted on functions, it wouldn't retrigger them. You'd have to say:

>> append 'd [a b c]
== [a b c d]

>> run flip append/ [a b c] 'd
== [a b c d]

Alternately, I guess you could use slash to run a GROUP!, but then you'd have a disabling slash and a running slash:

>> /(flip append/) [a b c] 'd
== [a b c d]

If it were instead something along the lines of RUN, where applying the flipped function was implicit, you could write:

>> flip append/ [a b c] 'd
== [a b c d]

I don't think flip/append being a synonym for /(flip append/) is a generically useful idea, compared to the likes of not/even?/ for cascading.

But if the weird idea of dialected CHAIN! ever came to pass, FLIP could go into a distinct mode based on receiving a function in the place other functions have refinements...

>> append/
== ~#[frame! [value series]]~

>> flip append/
== ~#[frame! [series value]]~

>> flip:append [a b c] 'd
== [a b c d]
1 Like