Re: [stack] array theory question
John Nowak <[email protected]>
| Newsgroups | gmane.comp.lang.concatenative |
|---|---|
| Message-ID | <[email protected]> |
On Dec 22, 2008, at 6:32 PM, John Nowak wrote:
> My question is this: Am I correct in thinking that single element
> arrays in Nial (and I believe also APL2) are equivalent to their
> contents? In other words, does {42} == 42?
Actually, I think my question should've be more precise: Do single
element arrays *containing atoms* equal the atoms that they contain?
I did manage Nial running. I somehow missed the binaries on the site
before. It does indeed turn out that '42 = {42}' as I had understood
from the array theory paper (http://www.nial.com/Documents.html).
However, it is not the case that '{{1 2}} = {1 2}'.
I think this is exactly the behavior I need. All functions could take
and return a single array, but construction (I guess called "atlas" in
Nial) would still work nicely (e.g. '+ [1, 2]' == '[3]' == '3'). I
suppose I'm reinventing something.
I think I've answered my question, but if anyone has thoughts on
Nial's approach to arrays as opposed to, say, APL's or J's, I would
very much appreciate them.
- John