Henry Rich wrote:
>
> The key concept is that of 'item'. An array (no, wait, a
> non-atomic array) is a list of its items.
>
The only atomic array is a rank-0 array? This is non-atomic:
1 1 $ 42
right?
Many of J's primitives treat the items as unbreakable.
Henry Rich wrote:
>
> {. removes the first item. That leaves 0 items. The
> shape of an item remains unchanged, but there are still
> 0 of them.
>
Yes, I like this. Kind of the idea of type-safety. If I remove an item from
an array with shape 1 1
then the shape is 0 1. Just like if you goto the store they might have 4
baskets of apples, 3, or 2 or 1 or 0... but they could still have 0 baskets
of apples. which is different from 0 baskets of oranges :)
--
View this message in context:
http://www.nabble.com/paradoxes---%282%29-Behead-%281%29-arrays-tf4618581s24193.html#a13191222
Sent from the J General mailing list archive at Nabble.com.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm