I don't understand the problem. 2 : 'x ; y' is the same as 2 : 'u ; v' (this is for compatibility with antediluvian versions of J).
2 : 'if. n do. x u y end.' is a mistake because it defines the monadic valence. You meant 2 : 0 : if. n do. x u y end. ) u/v always give you the left/right arguments to the conjunction itself. x/y give you the noun arguments to the derived verb PROVIDED the conjunction contains the word u/v/m/n somewhere. Henry Rich > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Pascal Jasmin > Sent: Monday, October 02, 2006 10:42 AM > To: General forum > Subject: [Jgeneral] conjunction definition problem- bug. > > there is a problem accessing the x parameter in conjunction > definitions that create a dyadic verb, with a noun right argument. > > t1 > 2 : ' x ; y ' > t2 > 2 : ' m ; n ' > t4 > 2 : '(u y) ; v y' > t > 2 : 'if. n do. x u y end.' > > (2 t2 3) > +-+-+ > |2|3| > +-+-+ > (2 t1 3) > +-+-+ > |2|3| > +-+-+ > (+: t4 *:) 2 3 > +---+---+ > |4 6|4 9| > +---+---+ > 1 (+ t 3) 2 > |domain error > > t5=: 2 : 'y ' NB. returns verb or noun bound to conjunction. > 2 (+ t5 +) 3 > 5 > 2 (+ t5 -) 3 > _1 > > > I would very much appreciate some mechanism for always > retrieving the left and right arguments to the bonded > conjunction (as x and y). I appreciate the issue of > polymorphic conjunctions (can accept either noun or verb > arguments), but these are rare and annoying to implement. > > A foreign (!:) could be used to test conjunction arguments > for whether they are verbs or nouns, but probably a better > approach to developing polymorphic conjunctions would be the > : separator used to distinguish monads and dyads. > Polymorphic Conjunctions could have up to 3 sections. > 2 : 0 > u v > : > u n NB.(use convention for noun and verb argument to always > be on same sides) > : > m n > ) > > > > ---------------------------------------------------------------------- > For information about J forums see > http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
