Blocks & Series


Red is built on "blocks". Essencially anything delimited by brackets is a block: [one block], [another block [block within a block]]


Inside the blocks you have series*, sometimes called a lists. They are an essential topic on Red Programming. In fact, data and even a Red programs themselves are series. The elements of a series can be anything inside the Red lexicon: data, words, functions, objects, and other series.

You must take a look at the series page at

* in reality series are higher than blocks in datatype hierarchy, i.e. a block has a series! datatype.

Strings etc.

Notice that strings are treated by Red as series of characters, and so the techniques used to manipulate series are also used for string operations. However, since string manipulation is so important, there is a special Strings and text manipulation chapter.

Actually, a lot of datatypes are also series that can be manipulated with the commands described here. Again, take a look at


Other languages have a data type called array. It is not difficult to realize that a one dimensional array is simply a series, and multi-dimensional arrays are series that contain other series as elements.

results matching ""

    No results matching ""