Macaulay2 » Documentation
Packages » Macaulay2Doc :: drop
next | previous | forward | backward | up | index | toc

drop -- drop some elements from a list or sequence.

Synopsis

Description

i1 : drop({a,b,c,d,e,f,g}, 3)

o1 = {d, e, f, g}

o1 : List
i2 : drop({a,b,c,d,e,f,g}, -3)

o2 = {a, b, c, d}

o2 : List
i3 : drop({a,b,c,d,e,f,g}, {1,3})

o3 = {a, e, f, g}

o3 : List
i4 : drop({a,b,c,d,e,f,g}, {2,2})

o4 = {a, b, d, e, f, g}

o4 : List

The pair \{j,k\} must be given with both entries non-negative, and $j\le k$. Otherwise the original list is returned.

i5 : drop({a,b,c,d,e,f,g}, {3,1})

o5 = {a, b, c, d, e, f, g}

o5 : List
i6 : drop({a,b,c,d,e,f,g}, {4,-1})

o6 = {a, b, c, d, e, f, g}

o6 : List

See also

Ways to use drop :

For the programmer

The object drop is a compiled function.