Actually, that was not quite adequate for arbitrarily ranked arrays
(It only worked for argument ranks 0 and 1).  For arbitrary ranked
arrays a little more attention to detail is needed:

easter=:3 :0
  'O a'=.|:0  19#: y
  'b c'=.|:0 100#: y
  'd e'=.|:0   4#: b
  'g O'=.|:0  25#: 13+8*b
  'O h'=.|:0  30#: 15+b+(19*a)-|:d+g
  'u O'=.|:0 319#: a+11*|:h
  'i k'=.|:0   4#: c
  'O q'=.|:0   7#: 32+u+(2*e+i)-k+h
  'n O'=.|:0  25#: 90+q+|:h-u
  'O p'=.|:0  32#: 19+n+|:q+|:h-u
  |:>y;n;|:p
)

(The issue was that odd arrays have a different
orientation for their dimensions than even arrays.)

FYI,

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

Reply via email to