Terrance wrote:
> atom - rank 0, shape: empty list
> list - rank 1, shape: list with 1 integer
> table - rank 2, shape: list with 2 integers
> report - rank 3, shape: list with 3 integers
>
> But then we need to disrupt this smooth flow:
>
> empty-list - rank 1, shape: 0
That topic does not fit by extension. The sequence
described is one in which the number of axes was
incrementally reduced. Such examination is wholly
separate from the topic of empty lists.
You are correct in seeing empty-list as not fitting
with the smooth flow of difference-in-shape. The
thing to notice, here, is that emptiness and
non-emptiness is (almost) independent of shape. (The
dependency is that empty arrays must have positive
rank.)
J nouns come in two non-exclusive flavors,
nouns-with-atoms and nouns-with-axes. "Empty" is what
we call nouns which have at least one axis, but no
atoms.
"Normal" (full, whole, complete) nouns have positive
count of both axes and atoms. In those cases we may
say (in J):
*./(0 < [EMAIL PROTECTED] , */@$) NounInQuestion
1
Or, in a more Anglicized phrasing:
countAxes =: [EMAIL PROTECTED]
countAtoms =: */@$
arePositive =: 0&<
allTrue =: *./
allTrue @ arePositive @ (countAxes, countAtoms)
NounInQuestion
1
--
Tracy B. Harms
The advantages of executability and universality
found in programming languages can be effectively
combined, in a single coherent language, with the
advantages offered by mathematical notation.
Kenneth E. Iverson
____________________________________________________________________________________
Be a better pen pal.
Text or chat with friends inside Yahoo! Mail. See how.
http://overview.mail.yahoo.com/
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm