Vocabulary sequences Inputs Outputs Word description Outputs a new sequence consisting of all elements of
seq until the
n th element from the end. In other words, it removes the last
n elements.
Examples USING: sequences prettyprint ;
{ 1 2 3 4 5 6 7 } 2 head* .{ 1 2 3 4 5 }
When a sequence may not have enough elements:
USING: sequences prettyprint ;
{ 1 2 } 5 index-or-length head* .{ }
Errors Throws an error if the index is out of bounds.
See also head ,
head-slice ,
head-slice* Definition
This documentation was generated offline from a
load-all
image. If you want, you can also
browse the documentation from within the UI developer tools . See
the Factor website
for more information.
Factor 0.101 x86.64 (2285, heads/master-b421db68db, Dec 1 2024 21:53:36)