drop

drop(v,n) -- yields the list obtained from the list v by dropping the first n elements. Also works for sequences.
drop(v,-n) -- yields the list obtained from the list v by dropping the last n elements.
drop(v,{m,n}) -- yields the list obtained from the list v by dropping the elements at positions m through n.

i1 : drop({a,b,c,d,e},2)

o1 = {c, d, e}

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

o2 = {a, b, c}

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

o3 = {a, b, e}

o3 : List

See also take.


topindexpreviousupnext