Method code for $list.chop()

[Turn on line numbering]
arg list, @count;

// chops the last <count> elements off the list.
// return [] if count is longer then the list.
count = count || 1;
anticipate_assignment();
return (| sublist(list, 1, listlen(list) - count) |) || [];

["// Created 26-Mar-1995 as a part of ColdCore, see: @help Credit"]

the Cold Dark