Typesets represents sets of datatype values stored in a compact array of bits (up to 96 bits), allowing for high performance runtime type-checking support.
Datatypes in a typeset may share common traits or behaviors, but that is not a requirement. A typeset can be created based on any criteria that suits the users needs.
See: typeset!
-
make typeset! [datatype! unset! none! logic! block! paren! string! file! url! char! integer! float! word! set-word! lit-word! get-word! refinement! issue! native! action! op! function! path! lit-path! set-path! get-path! routine! bitset! object! typeset! error! vector! hash! pair! percent! tuple! map! binary! time! tag! email! handle! date! image! event!]
-
make typeset! [datatype! none! logic! block! paren! string! file! url! char! integer! float! word! set-word! lit-word! get-word! refinement! issue! native! action! op! function! path! lit-path! set-path! get-path! routine! bitset! object! typeset! error! vector! hash! pair! percent! tuple! map! binary! time! tag! email! handle! date! image! event!]
-
make typeset! [event!]
-
make typeset! [block! paren! string! file! url! path! lit-path! set-path! get-path! vector! hash! binary! tag! email! image!]
A series in Red is defined as a sequence of elements, and a starting position which can be moved along the sequence of elements from the first position (
head), to the last position (tail). The starting position of an empty series is at the last position (tail).Several references can be set to the same series with different starting positions:
>> a: "hello" == "hello" >> b: next a == "ello" >> index? a == 1 >> index? b == 2 >> same? a b == false >> same? a head b == true >> append a " world" == "hello world" >> b == "ello world"
The type of the elements in a series is dependant on the datatype! of the series. For example, a block! series can contain values of any type. A string! series can only contain char! values, etc.
Series!provides an index variable that can be leveraged by all series action! values.