Terrance wrote:
> Yes, but what does one input give you? Primes or
> _a_ prime? And even with your rank-1 input, the
> data is being taken as 0-cells, or singular inputs.
> Thus, as I said originally, the input to p: is
> singular and the output is singular.
>
> Contrast that with i.
>
> One singular input returns pluralistic output:
>
> i. 5
> 0 1 2 3 4
The input to p: is indeed singular; it is an array.
The output of p: is similarly singular; it is also an
array. The output of p: is an array of primes.
I recommend not envisioning some lower level
unit-of-processing than the verb. The way you have
been focused on rank, frames, and cells, suggests to
me that youre working from a presumption that real
programming is a matter of processing scalar values
through loops. Certainly it is possible to think
accurately in those terms, but the APL language family
gives us an opportunity to think in other terms.
In this instance, the primary verb p: accepts a
numeric noun and produces a noun of the same datatype
and shape, comprised of primes. Thus, it is naturally
called primes.
--
Tracy B. Harms
It is the central thesis of this book that the descriptive
and analytic power of an adequate programming language amply
repays the considerable effort required for its mastery.
Kenneth E. Iverson
A Programming Language, 1962
____________________________________________________________________________________
Be a better Heartthrob. Get better relationship answers from someone who knows.
Yahoo! Answers - Check it out.
http://answers.yahoo.com/dir/?link=list&sid=396545433
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm