>>  <<  Ndx  Usr  Pri  Phr  Dic  Rel  Voc  !:  wd  Help  Dictionary

17. Partitions (Based on Cut Conjunction)

The left argument of the cut conjunction is a function which is applied to various types of partitions specified by the numeric right argument. We will illustrate its behaviour for the fixed function box, using the adverb <;. :
   t=: 'When eras die/their legacies/are left to/strange police/'

   ;: t
+----+----+---+-+-----+--------+-+---+----+--+-+-------+------+-+
|When|eras|die|/|their|legacies|/|are|left|to|/|strange|police|/|
+----+----+---+-+-----+--------+-+---+----+--+-+-------+------+-+

   cut=: <;.

   _2 cut ;: t
+---------------+----------------+-------------+----------------+
|+----+----+---+|+-----+--------+|+---+----+--+|+-------+------+|
||When|eras|die|||their|legacies|||are|left|to|||strange|police||
|+----+----+---+|+-----+--------+|+---+----+--+|+-------+------+|
+---------------+----------------+-------------+----------------+
 
   2 cut ;: t
+-----------------+------------------+---------------+------------------+
|+----+----+---+-+|+-----+--------+-+|+---+----+--+-+|+-------+------+-+|
||When|eras|die|/|||their|legacies|/|||are|left|to|/|||strange|police|/||
|+----+----+---+-+|+-----+--------+-+|+---+----+--+-+|+-------+------+-+|
+-----------------+------------------+---------------+------------------+

   (i. 3 2 2);(i. 12 12)
+-----+-----------------------------------------------+
| 0  1|  0   1   2   3   4   5   6   7   8   9  10  11|
| 2  3| 12  13  14  15  16  17  18  19  20  21  22  23|
|     | 24  25  26  27  28  29  30  31  32  33  34  35|
| 4  5| 36  37  38  39  40  41  42  43  44  45  46  47|
| 6  7| 48  49  50  51  52  53  54  55  56  57  58  59|
|     | 60  61  62  63  64  65  66  67  68  69  70  71|
| 8  9| 72  73  74  75  76  77  78  79  80  81  82  83|
|10 11| 84  85  86  87  88  89  90  91  92  93  94  95|
|     | 96  97  98  99 100 101 102 103 104 105 106 107|
|     |108 109 110 111 112 113 114 115 116 117 118 119|
|     |120 121 122 123 124 125 126 127 128 129 130 131|
|     |132 133 134 135 136 137 138 139 140 141 142 143|
+-----+-----------------------------------------------+

   (i. 3 2 2) 0 cut i. 12 12
+--------+---------------------------+-----------+
| 1  2  3| 53  54  55  56  57  58  59|105 106 107|
|13 14 15| 65  66  67  68  69  70  71|117 118 119|
|        | 77  78  79  80  81  82  83|129 130 131|
|        | 89  90  91  92  93  94  95|141 142 143|
|        |101 102 103 104 105 106 107|           |
|        |113 114 115 116 117 118 119|           |
+--------+---------------------------+-----------+



>>  <<  Ndx  Usr  Pri  Phr  Dic  Rel  Voc  !:  wd  Help  Dictionary