And now APPLY has an infix shorthand...
Meet The //
Operator!
The choice to use slashes for the operator became obvious, now that /WORD
Runs Functions (and :WORD
is taking over refinement!)
>> append // [[a b c] <d> :dup 2]
== [a b c <d> <d>]
>> append // [:dup 2 [a b c] spread [e f]]
== [a b c e f e f]
>> append:dup // [[a b c] [e f] 2]
== [a b c [e f] [e f]]
It's strange but also it's a mixture of heavy and light, as a kind of "joiner" or concatenator, almost as if you were sticking the things together into a single thought.
append//[[a b c] <d> :dup 2]
I know it's not perfect, but nothing will be. I don't like an APPLY operator that sits to the left and quotes:
apply append [[a b c] <d> :dup 2] ; !!! bad
Because that makes it look too much like the BLOCK! is the first argument to APPEND. So you really have to do APPLY with an inert form:
apply get $append [[a b c] <d> :dup 2]
apply append. [[a b c] <d> :dup 2]
So if no GET-WORD! is to be used and quoting is in play, there has to be something learnable and infix to jolt the flow. I've tried a lot of things at this point, this feels like the logical conclusion.
append // [[a b c] <d> :dup 2]