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

Reply via email to