
    Reference example for reduce across various axes and resulting way(s) to improve to_string
      y. := [n(4), n(4)+4, 8+n(4)];     //3x4
      yy. := [y., 100+y.];              // 2x3x4
      yyy.:=[yy., 200 + yy., 400 + yy.]; //3x2x3x4

      // Axis 0 → 2x3x4: 1 application of reduce
      yyy_reduce0. := reduce(@+, yyy.);

      // Axis 1 → 3x3x4: 3 applications of reduce
      yyy_reduce1.0. :=  yyy.0.0 + yyy.0.1;
      yyy_reduce1.1. :=  yyy.1.0 + yyy.1.1
      yyy_reduce1.2. :=  yyy.2.0 + yyy.2.1

      // Axis 2 →  3x2x4: 3x2 = 6 applications
      yyy_reduce2.0.0. := yyy.0.0.0 + yyy.0.0.1 + yyy.0.0.2;
      yyy_reduce2.1.0. := yyy.1.0.0 + yyy.1.0.1 + yyy.1.0.2
      yyy_reduce2.1.1. := yyy.1.1.0 + yyy.1.1.1 + yyy.1.1.2
      yyy_reduce2.2.0. := yyy.2.0.0 + yyy.2.0.1 + yyy.2.0.2
      yyy_reduce2.2.1. := yyy.2.1.0 + yyy.2.1.1 + yyy.2.1.2
      yyy_reduce2.0.1. := yyy.0.1.0 + yyy.0.1.1 + yyy.0.1.2

      // Axis 3 → 3x2x3: 3x2x3 = 18 applications
      yyy_reduce3.0.0.0 := yyy.0.0.0.0 + yyy.0.0.0.1 + yyy.0.0.0.2 + yyy.0.0.0.3
      yyy_reduce3.0.0.1 := yyy.0.0.1.0 + yyy.0.0.1.1 + yyy.0.0.1.2 + yyy.0.0.1.3
      yyy_reduce3.0.0.2 := yyy.0.0.2.0 + yyy.0.0.2.1 + yyy.0.0.2.2 + yyy.0.0.2.3

      yyy_reduce3.0.1.0 := yyy.0.1.0.0 + yyy.0.1.0.1 + yyy.0.1.0.2 + yyy.0.1.0.3
      yyy_reduce3.0.1.1 := yyy.0.1.1.0 + yyy.0.1.1.1 + yyy.0.1.1.2 + yyy.0.1.1.3
      yyy_reduce3.0.1.2 := yyy.0.1.2.0 + yyy.0.1.2.1 + yyy.0.1.2.2 + yyy.0.1.2.3

      yyy_reduce3.1.0.0 := yyy.1.0.0.0 + yyy.1.0.0.1 + yyy.1.0.0.2 + yyy.1.0.0.3
      yyy_reduce3.1.0.1 := yyy.1.0.1.0 + yyy.1.0.1.1 + yyy.1.0.1.2 + yyy.1.0.1.3
      yyy_reduce3.1.0.2 := yyy.1.0.2.0 + yyy.1.0.2.1 + yyy.1.0.2.2 + yyy.1.0.2.3

      yyy_reduce3.1.1.0 := yyy.1.1.0.0 + yyy.1.1.0.1 + yyy.1.1.0.2 + yyy.1.1.0.3
      yyy_reduce3.1.1.1 := yyy.1.1.1.0 + yyy.1.1.1.1 + yyy.1.1.1.2 + yyy.1.1.1.3
      yyy_reduce3.1.1.2 := yyy.1.1.2.0 + yyy.1.1.2.1 + yyy.1.1.2.2 + yyy.1.1.2.3

      yyy_reduce3.2.0.0 := yyy.2.0.0.0 + yyy.2.0.0.1 + yyy.2.0.0.2 + yyy.2.0.0.3
      yyy_reduce3.2.0.1 := yyy.2.0.1.0 + yyy.2.0.1.1 + yyy.2.0.1.2 + yyy.2.0.1.3
      yyy_reduce3.2.0.2 := yyy.2.0.2.0 + yyy.2.0.2.1 + yyy.2.0.2.2 + yyy.2.0.2.3

      yyy_reduce3.2.1.0 := yyy.2.1.0.0 + yyy.2.1.0.1 + yyy.2.1.0.2 + yyy.2.1.0.3
      yyy_reduce3.2.1.1 := yyy.2.1.1.0 + yyy.2.1.1.1 + yyy.2.1.1.2 + yyy.2.1.1.3
      yyy_reduce3.2.1.2 := yyy.2.1.2.0 + yyy.2.1.2.1 + yyy.2.1.2.2 + yyy.2.1.2.3



       yyy.
      [
       [[[0,1,2,3],[4,5,6,7],[8,9,10,11]],[[100,101,102,103],[104,105,106,107],[108,109,110,111]]],
       [[[200,201,202,203],[204,205,206,207],[208,209,210,211]],[[300,301,302,303],[304,305,306,307],[308,309,310,311]]],
       [[[400,401,402,403],[404,405,406,407],[408,409,410,411]],[[500,501,502,503],[504,505,506,507],[508,509,510,511]]]
      ]
      Possible better format? alternate row or column placement depending on if rank is in even or odd
       so if rank is 1 (list) all elements are in column. 3-vector
       A
       B
       C
       rank is 2 (array) column of vectors 3x3 array, 3, 3 lists
       [A,a,0]
       [B,b,0]
       [C,c,0]
       rank is 3 the arrays for 1st index are arranged in a row 2x3x3 array 2, 3x3's
       [A,a,0]   [D,d,1]
       [B,b,0]   [E,e,1]
       [C,c,0]   [F,f,1]
       rank is 4, arrays for first index are in a column of 2x2x3x3, 2 2x3x3's
       [A,a,0]   [D,d,1]
       [B,b,0]   [E,e,1]
       [C,c,0]   [F,f,1]

       [G,g,2]   [J,j,3]
       [H,h,2]   [K,k,3]
       [I,i,2]   [L,l,3]

    So yyy., 3x2x3x4 reformatted looks like
       [0,1,2,3]            [100,101,102,103]
       [4,5,6,7]            [104,105,106,107]
       [8,9,10,11]          [108,109,110,111]

       [200,201,202,203]    [300,301,302,303]
       [204,205,206,207]    [304,305,306,307]
       [208,209,210,211]    [308,309,310,311]

       [400,401,402,403]    [500,501,502,503]
       [404,405,406,407]    [504,505,506,507]
       [408,409,410,411]    [508,509,510,511]

which is much more readable and compact.
          reduce(@+, yyy.)== reduce(@+, yyy.0)  is 2x3x4 <--> 1x2x3x4
       [600,603,606,609]   [900,903,906,909]
       [612,615,618,621]   [912,915,918,921]
       [624,627,630,633]   [924,927,930,933]

==     [0,1,2,3]            [100,101,102,103]
       [4,5,6,7]            [104,105,106,107]
       [8,9,10,11]          [108,109,110,111]
                         +
       [200,201,202,203]    [300,301,302,303]
       [204,205,206,207]    [304,305,306,307]
       [208,209,210,211]    [308,309,310,311]
                          +
       [400,401,402,403]    [500,501,502,503]
       [404,405,406,407]    [504,505,506,507]
       [408,409,410,411]    [508,509,510,511]

        reduce(@+,yyy.,1)   is 3x3x4  <--> 3x1x3x4

      [100,102,104,106]
      [108,110,112,114]
      [116,118,120,122]

      [500,502,504,506]
      [508,510,512,514]
      [516,518,520,522]

      [900,902,904,906]
      [908,910,912,914]
      [916,918,920,922]

==
       [0,1,2,3]             [100,101,102,103]
       [4,5,6,7]        +    [104,105,106,107]
       [8,9,10,11]           [108,109,110,111]

       [200,201,202,203]    [300,301,302,303]
       [204,205,206,207] +   [304,305,306,307]
       [208,209,210,211]    [308,309,310,311]

       [400,401,402,403]    [500,501,502,503]
       [404,405,406,407]  +  [504,505,506,507]
       [408,409,410,411]    [508,509,510,511]

      reduce(@+, 2) is 3x2x4 (should be formatted like this? No intrinsic way to know this from data though)
      Actually if this is 3x2x1x4 it works automatically

        [12,15,18,21]        [312,315,318,321]

        [612,615,618,621]     [912,915,918,921]

        [1212,1215,1218,1221]   [1512,1515,1518,1521]

==
       [0,1,2,3]            [100,101,102,103]
            +                      +
       [4,5,6,7]            [104,105,106,107]
            +                      +
       [8,9,10,11]          [108,109,110,111]

       [200,201,202,203]    [300,301,302,303]
            +                      +
       [204,205,206,207]    [304,305,306,307]
            +                      +
       [208,209,210,211]    [308,309,310,311]

       [400,401,402,403]    [500,501,502,503]
            +                      +
       [404,405,406,407]    [504,505,506,507]
            +                      +
       [408,409,410,411]    [508,509,510,511]

       reduce(@+, yyy., 3) 3x2x3  <--> 3x2x3x1

         [6,22,38]      [406,422,438]

        [806,822,838]   [1206,1222,1238]

        [1606,1622,1638] [2006,2022,2038]
==
         0+1+2+3 == 6           100+101+102+103 == 406
         4+5+6+7 == 22          104+105+106+107 == 422
       8+9+10+11 == 38          108+109+110+111 == 438
           &c.


 yyy. [
 yyy.0 [                 yyy.1 [                      yyy.2     [
yyy.0.0  [[0,1,2,3],     yyy.1.0 [[200,201,202,203],  yyy.2.0   [[400,401,402,403],  sum each row to get the rows of reduce0
          [4,5,6,7],              [204,205,206,207],            [404,405,406,407],   sum columns to get reduce1
          [8,9,10,11]             [208,209,210,211]             [408,409,410,411]    sum down each matrix of y. to get reduce2
         ],                       ],                          ]
yyy.0.1 [[100,101,102,103], yyy.1.1 [[300,301,302,303], yyy.2.1 [[500,501,502,503],
          [104,105,106,107],      [304,305,306,307],            [504,505,506,507],
          [108,109,110,111]        [308,309,310,311]            [508,509,510,511]
        ],                        ],                         ],
       ] ?? EXTRA??
      ]
         yyy_reduce0.
      [
       [[600,603,606,609],
        [612,615,618,621],
        [624,627,630,633]],
       [[900,903,906,909],
        [912,915,918,921],
        [924,927,930,933]]
      ]

         yyy_reduce1.
     [
      [[100,102,104,106],
       [108,110,112,114],
       [116,118,120,122]],
      [[500,502,504,506],
       [508,510,512,514],
       [516,518,520,522]],
      [[900,902,904,906],
       [908,910,912,914],
       [916,918,920,922]]
     ]
        yyy.reduce2.  // 3x2x2
     [
[
 [[12,15,18,21],
  [312,315,318,321]],
 [[612,615,618,621],
  [912,915,918,921]],
 [[1212,1215,1218,1221],
  [1512,1515,1518,1521]]
]

     yyy_reduce3.; //3x2x3
[
 [[6,22,38],
  [406,422,438]],
 [[806,822,838],
  [1206,1222,1238]],
 [[1606,1622,1638],
  [2006,2022,2038]]
]

     */
