Thanks! i haven’t come across that in the primer or may be ioverlooked.On Apr 29, 2:32?pm, Attila Vrabecz <attila.vrab…> wrote:> q)(inter)over x> ,2> ? Attila>>>> On Thu, Apr 29, 2010 at 10:26 AM, bharani <bharani_…> wrote:> > Hi,>> > i have 3 arrays like>> > a: 1 2 3> > b: 2 3 4> > c: 2 4 44>> > and another array containing these 3 arrays like>> > x: (a;b;c)>> > I am trying to find the intersection of a b and c but i can only think> > of> > doing it with a loop like>> > f:{ e: x[0];i:1; while[i< count x; e: e inter x[i];i: i +1];e}>> > how to do this with out the explicit looping?>> > Thanks> > Bharani>> > –> >
Submitted via Google Groups</bharani_…></attila.vrab…>
I am sorry i don’t understand the second way ( inter/ ). could youplease explain or point any reference for that one?ThanksBharaniOn Apr 29, 2:34?pm, Charles Skelton <char…> wrote:> https://code.kx.com/trac/wiki/Reference/over>> q)(inter) over x>> ,2>> q)inter/>> ,2>>>> On Thu, Apr 29, 2010 at 11:26 AM, bharani <bharani_…> wrote:> > Hi,>> > i have 3 arrays like>> > a: 1 2 3> > b: 2 3 4> > c: 2 4 44>> > and another array containing these 3 arrays like>> > x: (a;b;c)>> > I am trying to find the intersection of a b and c but i can only think> > of> > doing it with a loop like>> > f:{ e: x[0];i:1; while[i< count x; e: e inter x[i];i: i +1];e}>> > how to do this with out the explicit looping?>> > Thanks> > Bharani>> > –> >
A forward slash / folds the preceding dyadic function on itself, it isthe same as 'over’https://code.kx.com/trac/wiki/Reference/SlashOn Apr 29, 1:10?pm, bharani <bharani_…> wrote:> I am sorry i don’t understand the second way ( inter/ ). could you> please explain or point any reference for that one?>> Thanks> Bharani>> On Apr 29, 2:34?pm, Charles Skelton <char…> wrote:>>>>>> >https://code.kx.com/trac/wiki/Reference/over>> > q)(inter) over x>> > ,2>> > q)inter/>> > ,2>> > On Thu, Apr 29, 2010 at 11:26 AM, bharani <bharani_…> wrote:> > > Hi,>> > > i have 3 arrays like>> > > a: 1 2 3> > > b: 2 3 4> > > c: 2 4 44>> > > and another array containing these 3 arrays like>> > > x: (a;b;c)>> > > I am trying to find the intersection of a b and c but i can only think> > > of> > > doing it with a loop like>> > > f:{ e: x[0];i:1; while[i< count x; e: e inter x[i];i: i +1];e}>> > > how to do this with out the explicit looping?>> > > Thanks> > > Bharani>> > > –> > >
Submitted via Google Groups</bharani_…></char…></bharani_…>
Also be careful: a forward slash marks a comment, when it has a spacebefore it.This is wrong: q)inter /PetruOn Apr 29, 3:09?pm, Jamie Dumbill <jamie.dumb…> wrote:> A forward slash / folds the preceding dyadic function on itself, it is> the same as ‘over’>> https://code.kx.com/trac/wiki/Reference/Slash>> On Apr 29, 1:10?pm, bharani <bharani_…> wrote:>>>> > I am sorry i don’t understand the second way ( inter/ ). could you> > please explain or point any reference for that one?>> > Thanks> > Bharani>> > On Apr 29, 2:34?pm, Charles Skelton <char…> wrote:>> > >https://code.kx.com/trac/wiki/Reference/over>> > > q)(inter) over x>> > > ,2>> > > q)inter/>> > > ,2>> > > On Thu, Apr 29, 2010 at 11:26 AM, bharani <bharani_…> wrote:> > > > Hi,>> > > > i have 3 arrays like>> > > > a: 1 2 3> > > > b: 2 3 4> > > > c: 2 4 44>> > > > and another array containing these 3 arrays like>> > > > x: (a;b;c)>> > > > I am trying to find the intersection of a b and c but i can only think> > > > of> > > > doing it with a loop like>> > > > f:{ e: x[0];i:1; while[i< count x; e: e inter x[i];i: i +1];e}>> > > > how to do this with out the explicit looping?>> > > > Thanks> > > > Bharani>> > > > –> > > >
Submitted via Google Groups</bharani_…></char…></bharani_…></jamie.dumb…>