Henry Rich wrote:
>
> Point of nomenclature: every noun has a shape. All shapes are lists.
> The shape of an atom is an empty list.
>
> (also, all nouns are arrays, ecch)
>
Statements like "all nouns are arrays" is hard to make precise
due to the dynamic typing of J. Here we should also consider
similar statement: any array with empty shape is a scalar,
according to which we are justified to think of 123 as a number.
For example: An array
123
is also a number 123, in contradistinction with an array:
1 2 3
which is not any number.
Semi-technical term for this is duck typing: if it looks like a
number and quacks like a number, then let's call it a number.
What does ecch stand for?
> The way to turn a list of length 1 to an atom is
>
> {. list
>
> The way to turn any array with 1 atom to a list is
>
> {. , array (or '' ($,) array)
>
> The line you quote will leave lim as an atom as long as y has rank less
> than 2.
>
> # 5
> 1
> $ 5
>
> # {. 4 5 6
> 1
> $ {. 4 5 6
>
> # 1 {. 4 5 6
> 1
> $ 1 {. 4 5 6
> 1
>
> Henry Rich
> [...]
>
--
View this message in context:
http://old.nabble.com/%7B.-y-produces-an-array.-tp32687373s24193p32689710.html
Sent from the J Programming mailing list archive at Nabble.com.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm