This (kind of) anomalies are not unusual in J:
   $&.> 1; 1 2; 1 2 3; 1 2 3 4; 1 2 3 4 5
++-+-+-+-+
||2|3|4|5|
++-+-+-+-+

and so
   $@(5&q:)&.> 1; 1 2; 1 2 3; 1 2 3 4; 1 2 3 4 5
+-+---+---+---+---+
|5|2 5|3 5|4 5|5 5|
+-+---+---+---+---+

Based on this, you could also state 
   $@(q:&y)&.> y=:1 2 3 4 5
+---+---+---+---+---+
|5 1|5 2|5 3|5 4|5 5|
+---+---+---+---+---+

is an anomaly.

   $@(q:&y)&.> y=:1 2 3 4 5
+-+---+---+---+---+
|5|5 2|5 3|5 4|5 5|
+-+---+---+---+---+

should considered to be (more) consistent.


As it is now ($ x q: y) -: ($ y),x
What other examples exist, apart from the trivial one $ itself, where one of
the parameters becomes part of the shape of the result?


I could not detect where ,5 is not consistent with the dictionary. 


R.E. Boss



-----Oorspronkelijk bericht-----
Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Namens Roger Hui
Verzonden: dinsdag 13 februari 2007 0:28
Aan: General forum
Onderwerp: Re: [Jgeneral] Shape of 1&q:

A result shape of 5 1 in that case is consistent 
with the specifications in the dictionary but 
one of ,5 is not.

Also:
   y=: >: i.5
   $@(q:&y)&.> 1 2 3 4 5 6
+---+---+---+---+---+---+
|5 1|5 2|5 3|5 4|5 5|5 6|
+---+---+---+---+---+---+

Making the first one ,5 instead of 5 1 would be
anomalous.  



----- Original Message -----
From: "R.E. Boss" <[EMAIL PROTECTED]>
Date: Monday, February 12, 2007 1:37 pm
Subject: [Jgeneral] Shape of 1&q:

>   $2 q: >:i.5
> 5 2
> 
> seems reasonable, but why is 
>
>   $1 q: >:i.5
> 5 1
>
> and not just 5?
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

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

Reply via email to