Borrowing from Guinn: 1 0 1 0 } (,:~(+: :: ])L:0) 4;'a';3;6 +-+-+-+--+ |4|a|3|12| +-+-+-+--+
R.E. Boss (Add your info to http://www.jsoftware.com/jwiki/Community/Demographics ) > -----Original Message----- > From: [email protected] [mailto:programming- > [email protected]] On Behalf Of Pascal Jasmin > Sent: vrijdag 28 maart 2014 2:27 > To: [email protected] > Subject: Re: [Jprogramming] apply verb to filtered list > > found it: > > 1 0 1 (+:@:])^:[ each 4;'a'; 6 > ┌─┬─┬──┐ > │8│a│12│ > └─┴─┴──┘ > > 1 0 1 ]`(+:@:])@.[ "0 ] 4 1 6 > 8 1 12 > > > > ----- Original Message ----- > From: Pascal Jasmin <[email protected]> > To: Programming forum <[email protected]> > Cc: > Sent: Thursday, March 27, 2014 8:17:06 PM > Subject: [Jprogramming] apply verb to filtered list > > f =: 1 0 1 > list =: 2;'a';3 > > as a simple example verb, +: is used. The verb is of no actual interest. > Only > the adverb. > > I would like an adverb that produces > > 4 1 6 -: 1 0 1 +: adv 2 1 3 > 1 > > or more advanced, > > 4 ;'a'; 6 -: 1 0 1 +: adv 2;'a'; 3 > > 1 > > It is NOT AN OPTION to query the list as part of an each expression. Using > the precalculated filter f is mandatory. > ---------------------------------------------------------------------- > 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
