Lists

A list is information in Logo enclosed in square brackets. Lists can contain numbers, words, other lists or any combination. Each item inside the square bracket of a list is an element of the list. Each list is a single object in Logo, although there is no limit to the number of elements in a single list. Examples of lists include:

? LIST? [1 2 3 GO!]

Result: TRUE

? LIST? RED BLUE] [ORANGE GREEN ] [BLACK YELLOW

Result: TRUE

? LIST? [PD FD 50 RT 90]

Result: TRUE

?

An empty list ([]) is a list with no elements.

? LIST? []

Result: TRUE

? COUNT []

Result: 0

?

Additional commands which are used with words and lists include: