Typesets

1. Abstract

Typesets represents sets, or collections, of datatype! values.

The datatypes in a typeset may share common traits or behaviors, but that is not a requirement. You can create your own typesets based on any criteria that suits your needs.

See: typeset!

2. Available typesets in Red

2.1. all-word!

2.2. any-block!

2.3. any-function!

2.4. any-list!

2.5. any-object!

2.6. any-path!

2.7. any-string!

2.9. any-word!

2.11. external!

2.13. internal!

2.14. scalar!

2.15. series!

  • 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.

results matching ""

    No results matching ""