It is a canon of J that an empty list has no contents.  Thus (# S:0 (0$a:)) is the same as (# S:0 '') .

   # S:0 ''
0

Surely this is right: the argument has level 0, so apply # to the argument in its entirety.

As a demonstration of the canon:

   L. 0$a:
0

Henry Rich

On 12/27/2022 8:46 PM, Igor Zhuravlov wrote:
On Mon, Dec 26, 2022 at 3:04 PM Raul Miller <[email protected]> wrote:
I do not understand the comment on this line:

    # S: 0 (0 {. a:)  NB. output isn't an empty list
0
I mean the result of this sentence execution should be an empty list:

    $ # S: 0 (0 {. a:)
0

but it gives a list of length 1:

    $ # S: 0 (0 {. a:)
1


----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to