Follow me:

+: (hook +:)(hook +:)
(+: +:) +:


((+: +:) +:) y
y (+: +:) +: y
2 3 (+: +:) +: 2 3
2 3 (+: +:) 4 6

   2 3 +: 8 12
|domain error
|   2 3    +:8 12

ah!    dyadic +: needs binary arguments

   0 1 +: 1 0
0 0

... and the dyadic case works because it ends up with:

   4 + 8 12
12 16






On 29-04-14 15:09, 'Pascal Jasmin' via Programming wrote:
hook =: 2 : ('([: u v)';':';'(u v)')

no problems with dyad:

    4  + (hook +:)(hook +:) 2 3
12 16

but why does this not work?
      +: (hook +:)(hook +:) 2 3
|domain error

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

--
Met vriendelijke groet,
@@i = Arie Groeneveld

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to