>>  <<  Usr  Pri  JfC  LJ  Phr  Dic  Rel  Voc  !:  Help  Dictionary

Spread u S: n  _ _ _  

u S: n produces the list resulting from applying u to the argument(s) at levels n (which has the same interpretation as the right argument of L:). For example, #0:S:0 y is the number of leaves (level 0 arrays) in y .
 

For example:
   fetch=: >@({&>/)@(<"0@|.@[ , <@]) " 1 _
   ] t=: 5!:2 <'fetch'             NB. An array with an interesting structure
+------------------------------------------------------+-+---+
|+-----------------+-+--------------------------------+|"|1 _|
||+-+-+-----------+|@|+--------------------+-+-------+|| |   |
|||>|@|+-------+-+|| ||+--------------+-+-+|,|+-+-+-+||| |   |
||| | ||+-+-+-+|/||| |||+-------+-+--+|@|[|| ||<|@|]|||| |   |
||| | |||{|&|>|| ||| ||||+-+-+-+|@||.|| | || |+-+-+-+||| |   |
||| | ||+-+-+-+| ||| |||||<|"|0|| |  || | || |       ||| |   |
||| | |+-------+-+|| ||||+-+-+-+| |  || | || |       ||| |   |
||+-+-+-----------+| |||+-------+-+--+| | || |       ||| |   |
||                 | ||+--------------+-+-+| |       ||| |   |
||                 | |+--------------------+-+-------+|| |   |
|+-----------------+-+--------------------------------+| |   |
+------------------------------------------------------+-+---+

   < S: 0 t                         NB. The boxed leaves of t
+-+-+-+-+-+-+-+-+-+-+-+--+-+-+-+-+-+-+-+---+
|>|@|{|&|>|/|@|<|"|0|@||.|@|[|,|<|@|]|"|1 _|
+-+-+-+-+-+-+-+-+-+-+-+--+-+-+-+-+-+-+-+---+

   11 {. t (; <@;) S: 0 1 {:: t     NB. A 2-column table of leaves and paths
+--+-----------+
|> |0 0 0      |
+--+-----------+
|@ |0 0 1      |
+--+-----------+
|{ |0 0 2 0 0  |
+--+-----------+
|& |0 0 2 0 1  |
+--+-----------+
|> |0 0 2 0 2  |
+--+-----------+
|/ |0 0 2 1    |
+--+-----------+
|@ |0 1        |
+--+-----------+
|< |0 2 0 0 0 0|
+--+-----------+
|" |0 2 0 0 0 1|
+--+-----------+
|0 |0 2 0 0 0 2|
+--+-----------+
|@ |0 2 0 0 1  |
+--+-----------+
||.|0 2 0 0 2  |
+--+-----------+


>>  <<  Usr  Pri  JfC  LJ  Phr  Dic  Rel  Voc  !:  Help  Dictionary