Code is data and data is code

Red is a modern descendant of the venerable LISP programming language. Instead of LISP's cumbersome parenthesis usage, it has taken Logo's simplified syntax. Everything in LISP is some kind of LISt Processing, and the same goes for Red—basically all code amounts to a combination of actions on blocks, which is the Red equivalent to LISP lists.

A block is simply a grouping of values between rectangular brackets [ ], such as [7 13 42]. You'll soon see that blocks are the fundamental building unit in Red code. This has the consequence that only a minimal syntax is used to represent code as well as data.

It will become clear that [ ] are used a lot in Red. On English or US keyboards this is easy, with its dedicated ...

Get Learn Red - Fundamentals of Red now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.