BUTLAST (BL)
Syntax BUTLAST word 
BUTLAST list 
 
Explanation BUTLAST reports all but the last element of its input. If the input is a list, BUTLAST reports a list containing all but the last element. If the input is a word or number, BUTLAST reports all the characters of the word or number except the last character.

See also BUTMEMBER, BUTFIRST, FIRST, and LAST.

The procedure below makes a plural word or list of words into singular form (for plural words that end in the letter S).

TO SINGULAR :WORD
    IF EMPTY? :WORD THEN STOP
    PRINT BUTLAST LAST :WORD
    SINGULAR BUTLAST :WORD
END

? SINGULAR [CATS]
CAT
? SINGULAR [BOOKS TOOLS FLOWERS EYES RUNS]
RUN
EYE
FLOWER
TOOL
BOOK

Examples BUTLAST [MARY HAD A LITTLE LAMB] 
Result: [MARY HAD A LITTLE] 
BUTLAST "OSTRICH 
Result: OSTRIC 
BUTLAST 3265 
Result: 326 
BUTLAST [[SNAKES SLITHER][RABBITS HOP] [MICE SCURRY]] 
Result:[[SNAKES SLITHER] [RABBITS HOP]] 

TopIndex