Lists

Lists are, well, lists of values. They are declared by using brackets.

say (1, 2, 3, 5)

Often you can use ranges to save some typing:

say (1 .. 5)

This also works on characters.

Exercise

Print out a list of characters from 'b' to 'm'.

say

Lists of course can hold not only numbers, but also strings:

say (1, 'hello', 2, 'there')

Lists used inside other lists are flattened:

say (1, (2, 3, 4), 5)