On 4/13/07, Henry Rich <[EMAIL PROTECTED]> wrote:
I am adding this section between "negative verb rank" and dyad rank.
Comments appreciated.


Ok, here they come.


Verbs With Rank Are Automatically Extensible

as soon as I read that title, I immediately thought: "What does he
mean verbs with rank"... this is like saying "water with wetness" ---
you cannot look in the J vocabulary and find a verb without rank.

I think it might be better titled: "Verbs Automatically Scale Based on
Their (default or assigned) Rank"


If you write a verb to find the length of a vector, and give that verb the rank 
1:
   len =: verb : '%: +/ *: y' "1  NB. %: sqrt  *: square

this is excellent. except did we discuss verb chains yet? and has "NB"
been introduced? I know what NB means, I'm just asking.

and I figured out that what you have there, works right associatively
and parses as:

(%: (+/ (*: y) ) )



you can use it to take the length of a single vector:
   len 3 4 5
7.07107
or two vectors:
   len i. 4 3
2.23607 7.07107 12.2066 17.3781
or a 2×4 array of vectors:
   len i. 2 4 3
2.23607 7.07107 12.2066 17.3781
 22.561 27.7489 32.9393 38.1314
All is grist that comes to this mill!


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

Reply via email to