Also note that i.0 0 is 0 lines with 0 elements each, which is somehow emptier than i.0 (a line with 0 elements).
If you invoke the verb (i.0) a number of times, like in (i.0)"0 'empty lines' the result is empty lines, whereas with (i.0 0)"0 'no empty lines' it is not :-) ________________________________________ From: Programming [[email protected]] on behalf of Raul Miller [[email protected]] Sent: Wednesday, June 07, 2017 17:32 To: Programming forum Subject: Re: [Jprogramming] Empty lists? As Pascal Jasmin has pointed out, EMPTY is a predefined name for an empty value. It's the only one that we get by default: (#~ 0&e.@$@".&>) nl_z_ 0 ┌─────┐ │EMPTY│ └─────┘ As Tom Arneson has pointed out, '' (two single quotes) is a constant noun for an empty value. Generally speaking, though, there are an infinity of empty nouns. For example (i. 3 2 1 0 1 2 3) is empty - because one of its dimensions is zero, there is no data in that array, it's just a collection of dimensions, at least one of which is zero. (And, since I'm recapping other messages in this thread, robert therriault mentioned 'empty' also comes with a definition by default.) Thanks, -- Raul On Wed, Jun 7, 2017 at 10:58 AM, Michael Rice <[email protected]> wrote: > Is there a special "noun" for an empty list? > > Creating one seems enigmatic. > > empty =: 1 2 > empty > 1 2 > empty =: }. empty > empty > 2 > empty =: }. empty > empty > > empty1 =: > |syntax error > | empty1=: > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
