some options, if you want your adverb to always produce a verb:
1 (>:@) >:@1 1 (>:@) 4 2 NB. increment on constant of 1 (u/m parameter) +: (>:@) 4 9 NB. increment after applying u (double) to y if you want "polymorphism" in your adverb to return noun result or verb depending on u or m, isNoun =: (0 = 4!:0 ::0:)@:< 1 {{if. isNoun 'u' do. >: m else. >:@u end.}} 2 + {{if. isNoun 'u' do. >: m else. >:@u end.}} >:@+ 2 + {{if. isNoun 'u' do. >: m else. >:@u end.}}3 6 On Monday, July 18, 2022 at 04:03:40 a.m. EDT, Jacques Bailhache <jacques.bailha...@gmail.com> wrote: I define an adverb which gives the successor of its argument : advsuc =: 1 : '>: u' 1 advsuc 2 Then I define an adverb which applies its argument to 1 : applyto1 =: 1 : '1 u' Then I apply it to the adverbial successor : advsuc applyto1 advsuc applyto1 Why isn't it evaluated to 2 ? ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm