(rontolisp) docs
← Functions

concatenate

(concatenate result-type &rest sequences)

Joins its sequence arguments into one new sequence of result-type. Three result families are supported: 'string (also 'simple-string / 'base-string), 'list (also 'cons), and 'vector (also 'simple-vector / 'array / 'bit-vector, and compound specs such as '(vector (unsigned-byte 8))). Every family walks any mix of sequence arguments: the 'string family too takes any character sequence, nil -- the empty list -- included. A result-type naming a user deftype resolves through its registered expansion to one of the families. With no sequences given it returns the empty sequence of that type, and the result is always fresh -- no argument is shared with it. In the compiled backends result-type must be written as a literal quoted designator; the interpreter also accepts a computed one.

A vector result-type spelling an (unsigned-byte 8), (unsigned-byte 16) or (unsigned-byte 32) element type -- '(vector (unsigned-byte 8)), '(simple-array (unsigned-byte 8) (*)) -- builds a specialized vector of that element type, the same representation make-array produces, so array-element-type reports it and typep against the matching simple-array specifier answers true. Elements are stored masked to the element width. Any other element type builds a general vector, whose element type is t.