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 <henryhr...@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
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to