[Jprogramming] problem matching boxed string
Joe Bogner
joebogner at gmail.com
Mon Jan 20 11:01:32 UTC 2014
Makes perfect sense now. The atom vs list distinction wasn't clicking
earlier. I had become so used to working with arrays that everything
became an array and I had completely forgotten about scalars. The
dictionary entry on nouns also covers it well,
http://www.jsoftware.com/help/dictionary/dicta.htm.
On Sun, Jan 19, 2014 at 11:18 PM, Henry Rich <HenryHRich at nc.rr.com> wrote:
> The primitives, namely ;: u;.n u\ u\. u/. produce lists even when there is
> only one item in the partition. Very regular.
I understand better why it would do that now. As it partitions a list,
it is likely simpler and performs better to create a list for each
partition instead of determining whether there's only one item in the
partition. I think of it as a splitting a char[] array into other
char[] arrays instead of char for single and char[] otherwise.
> There's just something special about a single character
> or a single number: they are atoms.
This and the dictionary entry explains why $ 'a' or $ (<'abc') returns
blank - since each are atoms.
Thanks again
More information about the Programming
mailing list