UPDATE: Looks like I rediscovered this idea 4 years later. Guess I forgot about it!
People very frequently request seeing the connection between the refinement and its value more obviously, because the refinement argument is kind of far away:
>> data: '(a b c)
>> append/dup data <foo> (1 + 2)
== (a b c <foo> <foo> <foo>)
So they make broken suggestions like append /dup 2 data <foo>
, which we constantly have to debunk.
Nowadays we have "APPLY II" which helps in more verbose cases:
>> data: '(a b c)
>> apply :append [data <foo> /dup (1 + 2)]
== (a b c <foo> <foo> <foo>)
But I had an odd idea...
What If You Could Directly Pass A Refinement Arg Via TUPLE?
>> data: '(a b c)
>> append/dup.3 data <foo>
== (a b c <foo> <foo> <foo>)
>> data: '(a b c)
>> append/dup.(1 + 2) data <foo>
== (a b c <foo> <foo> <foo>)
It wouldn't be great for everything, but it could be convenient. Not really hard to write, but is it compelling? Are there other potentially interesting meanings for this notation?