Yes... The precedence rule for conjunctions is different when no right argument is provided. In that case, the conjunction has lower precedence than anything else in the language. It's as if there's a "free parenthesis" to its left.
In other words +.|.@ is equivalent to (+. |.)@ The reasons for this are documented in http://www.jsoftware.com/help/dictionary/dicte.htm but this part of the grammar does not get much use here on the forums, so it's worth a note of explanation: The "Conj" grammar requires a right argument, and if a right argument is not present we use "Bident" instead. And Bident only works when the left edge is a part of the production, so the conjunction gets ignored until then. As an aside, I have not thought about why we have "0 Monad" -- why the Bident rule is not used to handle that case. Can anyone think of a mechanical reason? Or is it just emphasis? Thanks, -- Raul On Mon, Dec 10, 2012 at 4:01 PM, David Ward Lambert <[email protected]> wrote: > Without looking studying the sentence evaluator, I expected > > +.|.@ > (+. |.)@ > > to be identical to > +.(|.@) > |.@+. > > >> Date: Mon, 10 Dec 2012 15:41:52 -0500 >> From: Raul Miller <[email protected]> >> To: [email protected] >> Subject: Re: [Jprogramming] Just for fun, verb cross >> Message-ID: >> <CAD2jOU8iKSKDjgPuPf26_wqUSd3QOgscqLcXkCtMC0xZj2o >> [email protected]> >> Content-Type: text/plain; charset=UTF-8 >> >> For what it's worth, here's a parenthesis free implementation of my >> two variant definitions of cross (and note that I am using what is >> probably an unfamiliar J idiom here -- please feel free to ask for an >> explanation, if I am not making sense): >> >> selch=: #"0"1 >> orflp=: +.|.@ >> cross1=: ,@selch~ = orflp >> >> cross2=: ,@selch~ =@i.@# orflp > > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
