Roger Hui <[EMAIL PROTECTED]> wrote: > Using "????i.5" to display "+/i.5" obscures the power > of adverbs. +/x and */x tell you that the two operations are related. Not > so Sigma > x and > Pi x. And what do you do for *./x (for example)? > Big LCM?
Sum and Product are probably the two most frequently used phrases of the form v/ and, as such, possibly worthy of their own special primitives or symbols. There are many places where J uses a single symbol to replace a commonly-used phrase of several symbols, as a special instance of a more general-purpose primitive. In some cases, this use is intuitively obvious: -y instead of 0&-y -.y instead of 1&-y %y instead of 1&%y %:y instead of 2&%:y !y instead of 1&!y #.y instead of 2&#.y #:y instead of 2&(#.^:_1)y u&:v instead of u&(v"_) u&.:v instead of u&.(v"_) u@:v instead of u@(v"_) or ([:u v) j.y instead of 0&j.y or x j.y instead of x(+j.)y r.y instead of 1&r.y or x r.y instead of x(*r.)y q:y instead of 3&q:y x:y instead of 1&x:y 0:y instead of 0"_ y (n u v) instead of (n"_ u v) In some cases, it is not: <:y insted of -&1 y >:y instead of 1&+y +y instead of _10&o.y +:y instead of 2&* y -:y instead of %&2 y x-:y instead of x=&<y or x=y instead of x-:"0 y (v each) instead of v&.> -- Mark D. Niemiec <[EMAIL PROTECTED]> ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
