lr =: 3 : '5!:5 < ''y'''

this is correct result:

(lr ; 0:`1:@.(0 ~: ])"0) every < 2 3 $ 0 2 2 3 4 5 


+---------------+-----+ 
|2 3$0 2 2 3 4 5|0 1 1| 
|               |1 1 1| 
+---------------+-----+

but as part of many items

  (lr ; 0:`1:@.(0 ~:"0 ])"0)  every  'Hello World!';  '';  '0';  1;  0;  0.0;  
(i.0) ; 1 2 3;  'true';'false';0.1;(i.5);(0 2 2,: 3 4 5);(i: 2);(i.2 3);i: 2 3 
+------------------------------------+-----------------------+ 
|'Hello World!'                      |1 1 1 1 1 1 1 1 1 1 1 1| 
+------------------------------------+-----------------------+ 
|''                                  |                       | 
+------------------------------------+-----------------------+ 
|'0'                                 |1                      | 
+------------------------------------+-----------------------+ 
|1                                   |1                      | 
+------------------------------------+-----------------------+ 
|0                                   |0                      | 
+------------------------------------+-----------------------+ 
|0                                   |0                      | 
+------------------------------------+-----------------------+ 
|i.0                                 |                       | 
+------------------------------------+-----------------------+ 
|1 2 3                               |1 1 1                  | 
+------------------------------------+-----------------------+ 
|'true'                              |1 1 1 1                | 
+------------------------------------+-----------------------+ 
|'false'                             |1 1 1 1 1              | 
+------------------------------------+-----------------------+ 
|0.10000000000000001                 |1                      | 
+------------------------------------+-----------------------+ 
|0 1 2 3 4                           |0 1 1 1 1              | 
+------------------------------------+-----------------------+ 
|2 3$0 2 2 3 4 5                     |7 13827669224398897 0  | 
|                                    |3                 4 5  | 
+------------------------------------+-----------------------+ 
|_2 _1 0 1 2                         |1 1 0 1 1              | 
+------------------------------------+-----------------------+ 
|i.2 3                               |11089070505682471 0 1  | 
|                                    |                1 1 1  | 
+------------------------------------+-----------------------+ 
|2 7$_2 _1 0 1 2 0 0 _3 _2 _1 0 1 2 3|49 1 0 1 1 0 0         | 
|                                    | 1 1 1 0 1 1 1         | 
+------------------------------------+-----------------------+


 the tests on 2d arrays that start with 0 or include a 0, when some of the 
previous items are included return random results instead of 0 1).  The result 
is correct if some of the previous items in this list are removed.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to