Ditto Elijah, very nice indeed.

FYI I have not seen this done so neatly in J before now, and there is a 
striking resemblance to that used in Kx (kdb+) via the “vector conditional 
construct”, described here:

https://code.kx.com/q/ref/vector-conditional/

> On 30 May 2022, at 1:20 pm, Brian Schott <schott.br...@gmail.com> wrote:
> 
> Very nice. Thank you.
> 
> On Sun, May 29, 2022 at 6:08 PM Elijah Stone <elro...@elronnd.net> wrote:
> 
>> I would use a fork, and 'bind' the left argument to the result of f.
>> There is a difficulty, because you can't compose adverbs with verbs.
>> Perhaps something like this:
>> 
>>   c=. (*@] {{x}y}} ,:) f
>>   c i.10
>> 0 1 2 3 1 2 6 1 2 9
>> 
>> You can get rid of the explicit definition using boxes, if you really care
>> to, but I would not.
>> 
>> -E
>> 
>> 
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to