cuttail


Purpose
Cut the last elements of a list.
Synopsis
procedure cuttail(l:list, o:integer)
Arguments
A list
Number of elements to remove if >0 or number of elements to keep if <0
Example
L:=[1,2,3,4,5]
cuttail(L,2)    ! => L=[1,2,3]
cuttail(L,-1)   ! => L=[1]
Further information
If the second parameter is 0, the list is unchanged. If the same parameter is larger than the size of the list, all elements are deleted.
Related topics
cuthead


If you have any comments or suggestions about these pages, please send mail to support@fico.com.

© Copyright 2001-2013 Fair Isaac Corporation. All rights reserved.