They shouldn't be errors. A simpler one (because it doesn't depend on other definitions)
v2c =: 1 : '[. u ].' NB. cvc verb u to conjunction. adverb that binds middle tine of fork to obtain 2 other tines from returned conjunction. More complex versions handle noun forks. (v2c #) NB. av (% v2c #) (+/ % v2c) (% v2c) provides 4 of possible 6 partial bindings for 3 parameter function. The F0 F1 F2 F01 F12 F02 "fork functions" cover all partial bindings, and with conceptual convenience. The style avoids parentheses as well, and it all works "great" (intuitive to spec) +/ % F # + ] (+/ % #) + ] I do absolutely need modifiers being a valid return function from modifiers. (-@) for example. I don't know what beginner mistakes you are referring to. a cleaner version of playground that avoids parentheses in means definitions: https://jsoftware.github.io/j-playground/bin/html/emj.html#code=cocurrent%20'z'%0D%0AisNoun%20%3D%3A%20(0%20%3D%204!%3A0%20%3A%3A0%3A)%40%3A%3C%0D%0Aisgerund%20%3D%3A%200%3A%60(0%20-.%40e.%203%20%3A%20('y%20(5!%3A0)'%3B'1')%220)%40.(0%20%3C%20L.)%20%3A%3A%200%3A%0D%0Aar%20%3D%3A%201%20%3A%20'5!%3A1%20%3C''u'''%0D%0Aari%20%3D%3A%201%20%3A%20'if.%20isNoun%20''u''%20do.%20if.%20(isgerund%20-.%40%2B.%20''''%20-%3A%20%5D)%20m%20do.%20m%20ar%20else.%20m%20end.%20else.u%20ar%20end.'%0D%0Ati%20%3D%3A%20ari%20%60%20ari%20%20NB.%20different%20from%20doubleadverb2.ijs%3A%20''%20is%20passed%20to%20%60%20.%20boxed%20non%20gerund%20is%20ar'd%20ie%20a%3A%60u%0D%0AF0%20%3D%3A%201%20%3A%20'u%20ti%20ti%20%60%3A%206'%0D%0Av2c%20%3D%3A%201%20%3A%20'%5B.%20u%20%5D.'%0D%0AF1%20%3D%3A%201%20%3A%20'(ti%20u)%20ti%20(''''ti)%20%60%3A6'%0D%0AF2%20%3D%3A%201%20%3A%20'ti%20ti%20u%20%60%3A%206'%0D%0A%0D%0AF01%20%3D%3A%20((ti%20(2%20%3A%20'ti')))(%60%3A6)%0D%0AF02%20%3D%3A%202%20%3A%20'(u%60)(%60v)(%60%3A6)'%0D%0AF02%20%3D%3A%20(%20(%5B.(2%20%3A%20'ti'))%20(2%20%3A%20'ti'%20%5D.)%20)%20(%60%3A6)%20%0D%0AF12%20%3D%3A%20(2%20%3A%20'ti'%20%20ti)%20%60%3A%206%0D%0A%0D%0AF%20%3D%3A%20F12%20NB.%20chosen%20for%20composition%20consistency%2C%20but%20F1%20still%20very%20useful%0D%0A%0D%0A%20amend%20%3D%3A%20%5B%60%20(%5B.%20%60%20ar)%20%60%7B%60%5D%20%60%3A%206%20%60%20(%5D.%22_)%20%60%5D%20%7D~~%0D%0A%0D%0A%20NB.%20means%20from%20partial%20modifiers%0D%0A%0D%0A%20means%20%3D%3A%20F12%20%23%0D%0A%20mean%20%3D%3A%20%2B%2F%20%25%20means%20%0D%0A%20meang%20%3D%3A%20*%2F%20%25%3A~%20means%20%0D%0A%20meanh%20%3D%3A%20%2B%2F%40%3A%25%20%25~%20means%20 On Monday, March 28, 2022, 10:07:49 p.m. EDT, Henry Rich <[email protected]> wrote: Why do you have such a sentence? Do you need it? I want to make those an error, because beginners frequently create them by mistake. What does it do for you? Henry Rich On 3/28/2022 9:21 PM, 'Pascal Jasmin' via General wrote: > Expressions that return verbs create those error messages even though verb is > still returned from expression (if not assigned) > > +/ %F # (from linked playground) > > > > > > > On Monday, March 28, 2022, 09:15:25 p.m. EDT, Raul Miller > <[email protected]> wrote: > > > > > > Hmm... > > We could probably do with a denser way of expressing code. (I can > think of several possibilities here.) > > But, also, I ran into a problem testing this: > > mean =: +/ means % > (007) noun result was required > (007) noun result was required > meang =: */ means (%:~) > (007) noun result was required > (007) noun result was required > meanh =: +/@:% means (%~) > (007) noun result was required > (007) noun result was required > > FYI, > -- This email has been checked for viruses by AVG. https://www.avg.com ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
