Thanks Dan, this works well.
a=:i. 5 5
u=:([: < 3 ; < )
(u 4) { a
19
Perhaps I’m starting to get it.
a=:i. 5 5
j=:([: < 3 ; [: < [) { ]
4 j a
19
Anything has got to be better than u(4,a), or u(a[3,4]), etc. J’s way of
working with dyads and monads exclusively doesn’t quite seem natural to me
yet. My internal dialog keeps saying, but what if there is a need for more
than 2 parameters? You can get around some of it with structures. I
suppose that J’s encouragement of monads and dyads helps us simplify.
People by and large can’t deal with too many thoughts in their minds
simultaneously. ‘One’ or ‘Two’ is minimalist, but perhaps in being so we
gain more than we bargain for.
--Steven
Internal Virus Database is out-of-date.
Checked by AVG.
Version: 7.5.552 / Virus Database: 270.9.19/1857 - Release Date: 19/12/2008
10:09
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm