Try 

put =: 4 : '42 (x)}y'

verb is defined as 3, meaning a monadic verb, but a dyadic verb is needed.

Best regards, 
Markus

-----Ursprüngliche Nachricht-----
Von: Programming [mailto:programming-boun...@forums.jsoftware.com] Im Auftrag 
von Rudolf Sykora
Gesendet: Freitag, 23. Juni 2017 11:24
An: programm...@jsoftware.com
Betreff: [Jprogramming] verb to set an element of an array

Hello,

I want to set x'th element of y to 42.
I tried quite a few variations of

put := verb : '42 x}y'

but I am still getting

1 put 1 2 3
|domain error: put

Can you tell me what is wrong, and tell me how to do it right?

Thanks
Ruda
----------------------------------------------------------------------
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