BUTFIRST
Syntax BUTFIRST word 
BUTFIRST list 
 
Explanation BUTFIRST reports all but the first element of its input. If its input is a list, BUTFIRST reports a list containing all but the first element. If its input is a word or number, BUTFIRST reports all the characters of the word or number except the first character.

See also BUTMEMBERBUTLAST, FIRST, and LAST.

The following procedure removes one element at a time from a word or a list.

TO SHRINKWORD :WORD
    IF EMPTY? :WORD THEN STOP
    PR :WORD
    SHRINKWORD BUTFIRST :WORD
END

SHRINKWORD "WHEAT
WHEAT
HEAT
EAT
AT
T

Examples BUTFIRST [MARY HAD A LITTLE LAMB]
Result: [HAD A LITTLE LAMB] 
BUTFIRST "WHEAT 
Result: HEAT 
BUTFIRST [WHEAT] 
Result: [] 
BUTFIRST 2135 
Result: 135 
BUTFIRST [[JANUARY FEBRUARY][MARCH APRIL] [MAY JUNE]] 
Result: [[MARCH APRIL] [MAY JUNE]] 

TopIndex