I don't think it's necessary to rebuild the atomic rep of the verb. You could just compose the function directly.
Nevertheless, it does remind me of the absence of }:: in the language, and I wonder why it was never implemented. Performance questions aside, the definition of the adverb should be straightforward? (ok, also ignoring the need or possibility of a gerundial argument a-la (f`g`h)} ). Please excuse typos; sent from a phone. > On Jun 14, 2014, at 4:35 PM, "'Pascal Jasmin' via Programming" > <[email protected]> wrote: > > The approach with ar looked promising, and I made perhaps a poor > implementation: > > lexset2 =: 2 : ('(n) =: u(y&) ar';'y') > lex2 =: 1 : 0 > a =. m~ 5!:0 y > (m) =: <@:(0&{ , <@:((<(,'0');a) & (0}) )@:>@:(1&{))@:> m~ > a > ) > > + lexset2 'g' 1 > 1 > 'g' lex2 2 > 3 > 'g' lex2 2 > 5 > > >:@:[ lexset2 'g' 0 > 0 > 'g' lex2 2 > 1 > 'g' lex2 2 > 2 > > but its slow: ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
