On Sun, Mar 21, 2010 at 10:25 PM, David Ward Lambert
<[email protected]> wrote:
> Puzzle: Find the Noun below that returns a as shown.
>   Noun {:: <'ab'
> a

   ('';0) {:: <'ab'
a

Translation:

First use '' to select the contents of the only box.

Second, use 0 to select the letter 'a'.

Note also that {:: does not seem to follow the indexing rules
of { -- I do not know if this is a dictionary bug or not because
I do not know what "based on {" means in the dictionary entry
for fetch.

But, for example, ''&{@< 'ab' gives an empty result, and this
of course applies if 'ab' is replaced with something else.

It makes sense to me that '' { 'ab' would return empty but
I am not certain how to resolve the behaviors of { and {::
with empty left arguments and scalar right arguments.  If
the existing implementation is correct I think dictionary entry
for fetch should explicitly mention this issue.

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

Reply via email to