FANDOM


Syntax

BUTLAST word or list

BL word or list

Explanation

BUTLAST outputs all but the last element of its input. If the input is a list of words, BUTLAST outputs a list containing all the words but the last word. If the input is a word or number, BUTLAST outputs all the characters of the word or number except the last character.

See also BUTFIRST, FIRST, and LAST.

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]]

?

The procedure below makes a plural word or list of words into singular form.

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

?

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.