Luca Masini wrote: > I use a big array to memoize the result Oh, I should also point out J has native memoization. See http://www.jsoftware.com/help/dictionary/dmcapdot.htm .
-Dan PS: Generally speaking, I am suspicious of amend. Amendment is seen much less often in J, a functional array-oriented language, than in a normal (scalar) language. As one learns to reframe his thinking in terms of arrays (from the get-go), he uses amend less and less frequently. But it's still very useful and well-designed for those times it's needed (e.g. in "real life" programs for performance reasons, or when one legitimately does need to treat different indices differently). ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
