Roger, Nice! That reminds me of one of my handy functions - the odometer verb:
odo=: #: i.@(*/) So I can redefine your 'all' verb using odo, and and integrate the 'start' verb in it: all =: [:odo 3#>: So another, less brutish approach would be: f1=.10&#.@ select @ all f1 5 5 14 23 32 41 50 104 113 122 131 140 203 212 221 230 302 311 320 401 410 500 Skip On Wed, Jan 16, 2019 at 9:44 AM Roger Hui <[email protected]> wrote: > A less brutish approach: > > ] v=: i.6 > 0 1 2 3 4 5 > > 10 #. (5=+/"1 t)#t=: >,{v;v;v > 5 14 23 32 41 50 104 113 122 131 140 203 212 221 230 302 311 320 401 410 > 500 > > Tacit version: > > f=: 10&#. @ (] #~ 5 = +/"1) @ (>@,@{@(3&$)@<) @ i.@>: > > f 5 > 5 14 23 32 41 50 104 113 122 131 140 203 212 221 230 302 311 320 401 410 > 500 > > Tacit with components: > > select=: ] #~ 5 = +/"1 > all =: >@,@{@(3&$)@< > start =: i.@>: > f1 =: 10&#. @ select @ all @ start > > f1 5 > 5 14 23 32 41 50 104 113 122 131 140 203 212 221 230 302 311 320 401 410 > 500 > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
