Here is the definition of positive difference that works:

PosDiff =: 4 : '(x >. y) - (x <. y)'

I tried to create a version which is a fork, but it is returning 0 0
instead of differencing them:

PosDiff =: (] >. [) - (] <. [)
  PosDiff 4 3
0 0
  PosDiff 3 4
0 0
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to