The List¶
A list is a container with a collection of items of the same type. It can either be empty or contain one or more items.
Constructing the list¶
Empty list¶
Constructing an empty list block, simply remove all members from the input block toolbox [⚙].

Fig. 1: The empty list block

Fig. 2: Connecting the empty list block to the variable block
Non-empty list¶
The inhabitants of the list can be added or removed using the input block toolbox.

Fig. 3: Constructing the non-empty list block

Fig. 4: Connecting the non-empty list block to the variable block
Operator¶
is empty¶
To check whether the list is empty, return true when it is empty; otherwise, return false.

Fig. 5: The is-empty block operator with the empty list block

Fig. 6: The is-empty block operator with the non-empty list block
head¶
Retrieve the first inhabitant from the list.

Fig. 7: The head list operator block
tail¶
Obtain the inhabitants of the list, starting from the second inhabitant to the last one.

Fig. 8: The tail list operator block
append¶
Insert a new inhabitant into the list and put it into the first position.

Fig. 9: The append list operator block

Fig. 10: The append a new inhabitant and bind to a variable block.
Example¶
Sum¶

Fig. 11: The head list operator block