just a style/design point,

The parameters for a dyadic verb s/would be the 5 (sum) and whatever list to 
scan.

5 (] #~ [ = +/"1@(10 #.^:_1 ])) 10+i.900 
14 23 32 41 50 104 113 122 131 140 203 212 221 230 302 311 320 401 410 500


6 (] #~ [ = +/"1@(10 #.^:_1 ])) i.900 
6 15 24 33 42 51 60 105 114 123 132 141 150 204 213 222 231 240 303 312 321 330 
402 411 420 501 510 600


________________________________
From: 'robert therriault' via Programming <[email protected]>
To: Programming forum <[email protected]> 
Sent: Wednesday, January 16, 2019 2:42 AM
Subject: Re: [Jprogramming] Implicit Coding



Hey Skip,

A couple of different options (all dyadic verbs with arguments of 100 and 900)

    100 ((+ i.) #~ (5 = +/"1)@:(10 #.^:_1 (+ i.))) 900         NB. pretty much 
a transcription without the assignment
104 113 122 131 140 203 212 221 230 302 311 320 401 410 500
   100 (#~ (5 = +/"1)@:(10 #.^:_1 ]))@:(+ i.) 900              NB. Eliminate 
redundant (+ i.) by making into consecutive hooks
104 113 122 131 140 203 212 221 230 302 311 320 401 410 500
   100 (#~ (5 = +/"1) @:(10&#.^:_1))@:(+ i.) 900               NB. Convert (10 
#.^:_1 ]) fork into single verb (10&#.^:_1)

Cheers, bob


> On Jan 15, 2019, at 11:12 PM, 'Skip Cave' via Programming 
> <[email protected]> wrote:
> 
> a#~5=+/"1]10#.^:_1 a=:100+i.900

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