On Mon, Nov 9, 2015 at 11:21 AM, Raul Miller <rauldmil...@gmail.com> wrote:
>> I typically use & to bind parameters. & cannot be used on cocurrent >> because it's monadic, is that the correct interpretation? > > Basically, yes. > > 1: : 2: &3 '' > 2 > > You'll get the dyadic definition of cocurrent, which is empty. > >> Is there a way to determine the valence of a tacit verb? I dug deeper and for anyone who's curious on how the internals work (as I was), I was thinking & was failing because it was detecting the verb was monadic. I then wondered if there was a way to determine that from J. & had no such check. It was throwing a domain error because cocurrent is mapped to 18!:4, which is defined as jtlocswitch and 0 https://github.com/openj/core/blob/master/x.c#L218 Where 0 is translated to jtdomainerr2 https://github.com/openj/core/blob/master/au.c#L48 ((18!:4)&(<'base')) 0 would mean to bind jtdomainerr2 with (<'base') and then invoke it monadically with 0 On Mon, Nov 9, 2015 at 11:21 AM, Raul Miller <rauldmil...@gmail.com> wrote: > On Mon, Nov 9, 2015 at 10:10 AM, Joe Bogner <joebog...@gmail.com> wrote: >> If I type cocurrent 'base' , I would assume cocurrent is the >> currently executing named verb and it switched to base after the end >> of cocurrent >> >> Given that understanding, why would it switch back at the end of the >> explicit definition? Is that behavior documented somewhere? > > Because each name has an execution context which includes the locale > it's using for name resolution. > > It's probably documented somewhere, but I don't have time to look that > up right now. > >>> You either need to use ([ cocurrent bind 'base') instead of sb, or use >>> 18!:4 in sb . >>> >> >> I had forgotten about bind >> >> ([ cocurrent@('base'"_1)) 2 >> >> http://code.jsoftware.com/wiki/Vocabulary/quotem >> >> I typically use & to bind parameters. & cannot be used on cocurrent >> because it's monadic, is that the correct interpretation? > > Basically, yes. > > 1: : 2: &3 '' > 2 > > You'll get the dyadic definition of cocurrent, which is empty. > >> Is there a way to determine the valence of a tacit verb? > > If you are unclear on the syntax, you can use dissect and/or trace to > help you understand it. It can help, of course, to review dictionary > entries on any adverbs or conjunctions you're using. > > But all verbs are ambivalent (though possibly with empty definitions > for one or both syntactic cases). To understand that side of things, I > guess I'd read the dictionary (or nuvoc) for the primitives or read > the definition and/or documentation and/or experiment and/or ask here > on the forums, for proverbs. > > Thanks, > > -- > Raul > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm