Cut: Difference between revisions

From The K Language Wiki
Content added Content deleted
m (add note)
No edit summary
Line 1: Line 1:
{{primitive|x_y}}
{{primitive|x_y|in=K9}}


The '''cut''' primitive partitions the array <code>y</code> before the indices given in array <code>x</code>.
The '''cut''' primitive partitions the array <code>y</code> before the indices given in array <code>x</code>.

Revision as of 07:51, 20 July 2021

Cut
x_y
Supported in K9

The cut primitive partitions the array y before the indices given in array x.

The portion of the array before the first index is ignored.

Indices must be given in ascending order.

 0 4_"feedface"
("feed";"face")

 3 5_"adfdsfsdfa"
("ds"
 "fsdfa")