May 2018
Beginner
252 pages
6h 19m
English
In this section, we dive deeper into how Red uses words.
Prefixing a word with an apostrophe ('), such as 'b, treats the word literally. The value of 'b is the word b itself, b is not evaluated and is treated as a symbol; the type of 'b is lit-word!:
;-- see Chapter03/bindings.red:b: [1 2 3]'b ;== btype? 'b ;== word!
Why then does type? 'b give word! as a return value? This is because type? is a function (as are get and set , which we'll cover next), a function evaluates its argument(s), and the evaluation of 'b