[Jprogramming] prob with redefining hook

'Pascal Jasmin' via Programming programming at jsoftware.com
Tue Apr 29 14:10:38 UTC 2014


better solved with original semi-tacit design:

hook =: 2 : '([:u v) :  (u v) '


----- Original Message -----
From: 'Pascal Jasmin' via Programming <programming at jsoftware.com>
To: "programming at jsoftware.com" <programming at jsoftware.com>
Cc: 
Sent: Tuesday, April 29, 2014 9:40:06 AM
Subject: Re: [Jprogramming] prob with redefining hook

solved by redefining hook as:

  hook =: 2 : ('u v y' ;':';'x u v y')

I refer to original definition as 'semi tacit' in that it does not refer to xy args, and is generally faster, and also behaves more normally with locales.

The general usefulness of this conjunction is using it in adverb trains, where the client/consumer left verb argument doesn't need to be monadic as required when (@:+:) adverb is used.


----- Original Message -----
From: 'Pascal Jasmin' via Programming <programming at jsoftware.com>
To: Programming forum <programming at jsoftware.com>
Cc: 
Sent: Tuesday, April 29, 2014 9:09:03 AM
Subject: [Jprogramming] prob with redefining hook

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 

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


More information about the Programming mailing list