Oh, and as you've probably noticed, } and { could be used here, also (perhaps without using the rank conjunction, if the underlying verb had a servicable rank).
Thanks, -- Raul On Thu, Jan 16, 2020 at 9:07 AM Raul Miller <rauldmil...@gmail.com> wrote: > > Certainly. > > But I would be inclined to swap left and right arguments on you (to > follow the pattern we saw in Roger Hui's post). > > Some rather straightforward examples uses ^: or @. as their core > mechanism, and rank to spread the operation across the arguments. > > This could be done either explicitly or tacitly -- it's that > straightforward -- though if you get into additional constraints that > could change the playing field. > > Does this give you enough clues to see your way forward? Or are you > wanting to see canned implementations? (Be aware that canned > implementation get into questions which you've not yet addressed, like > "what rank"?) > > Thanks, > > -- > Raul > > On Thu, Jan 16, 2020 at 3:44 AM Skip Cave <s...@caveconsulting.com> wrote: > > > > I'm thinking of something along the lines of # (copy) > > > > 1 1 1 0 1 0 0 1 0 1 # i.10 > > > > 0 1 2 4 7 9 > > > > > > Only "apply" uses a boolean left argument to define which elements on the > > right are affected by the verb: > > > > > > 1 1 1 0 1 0 0 1 0 1 (apply -.) 1 1 1 1 1 1 1 1 1 1 > > > > 0 0 0 1 0 1 1 0 1 0 > > > > 1 1 1 0 1 0 0 1 0 1 (apply 2&+) 1 1 1 1 1 1 1 1 1 1 > > > > 3 3 3 1 3 1 1 3 1 3 > > > > 1 1 1 0 1 0 0 1 0 1 (apply 2&^~) i.10 > > > > 0 1 4 3 16 5 6 49 8 81 > > > > Is this possible? > > > > Skip Cave > > Cave Consulting LLC > > > > > > On Thu, Jan 16, 2020 at 2:08 AM Arnab Chakraborty <damd...@gmail.com> wrote: > > > > > My first idea was to use ^: . But I am unable to get a solution. None of > > > the posted solutions use ^: either. Just wondering whether ^: can help > > > here. > > > > > > On Thu, 16 Jan 2020, 12:36 'robert therriault' via Programming, < > > > programm...@jsoftware.com> wrote: > > > > > > > It is too late, considering the result is not the one that you > > > > requested! > > > > > > > > Anyway I would use a numerical approach something like the incorrect one > > > > that I just posted. > > > > > > > > Sheepishly - Cheers, bob > > > > > > > > > On Jan 15, 2020, at 23:03, 'robert therriault' via Programming < > > > > programm...@jsoftware.com> wrote: > > > > > > > > > > Hi Skip, > > > > > > > > > > A late snowy night silly approach > > > > > > > > > > ]a=.20#1 > > > > > 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 > > > > > f1=. *@(3&|)@:i.@:# NB. mod 3 non-zeros > > > > > f1 a > > > > > 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 > > > > > f2=. -.@*@(2&|)@:i.@:# NB. mod 2 zeros > > > > > f2 a > > > > > 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 > > > > > (f1 *: f2) a NB. Not-And fork > > > > > 1 1 0 1 0 1 1 1 0 1 0 1 1 1 0 1 0 1 1 1 > > > > > f=. f1 *: f2 NB. requested result > > > > > f a > > > > > 1 1 0 1 0 1 1 1 0 1 0 1 1 1 0 1 0 1 1 1 > > > > > > > > > > Cheers, bob > > > > > > > > > > > > > > >> On Jan 15, 2020, at 22:29, Skip Cave <s...@caveconsulting.com> wrote: > > > > >> > > > > >> ]a=.20#1 > > > > > > > > > > ---------------------------------------------------------------------- > > > > > For information about J forums see http://www.jsoftware.com/forums.htm > > > > > > > > ---------------------------------------------------------------------- > > > > For information about J forums see http://www.jsoftware.com/forums.htm > > > > > > > ---------------------------------------------------------------------- > > > For information about J forums see http://www.jsoftware.com/forums.htm > > > > > ---------------------------------------------------------------------- > > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm