drop

From The K Language Wiki
Revision as of 08:42, 17 July 2021 by Razetime (talk | contribs) (add drop page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Drop
a_y

The drop primitive removes elements from the start or the end of an array.

positive a removes elements from the start, and negative a removes from the end, similar to take.

 1_1 2 3
2 3

 -2_"abcde"
"abc"