XLISP vector

Nyquist / XLISP 2.0 - Contents | Tutorials | Examples | Reference

# vector

Type: | - | function (subr)
Source: | - | xlbfun.c

## Syntax

(vector [expr ... ])
  expr - an expression
  returns - the new vector

## Description

The 'vector' function creates an initialized vector and returns it as the result. 'vector' is essentially a fast method to do a one-dimensional make-array with initial data in the vector.

## Examples

    (vector 'a 'b 'c)        ; returns #(A B C)
    (vector '(a b) '(c d))   ; returns #((A B) (C D))
    (vector)                 ; returns #()
    (vector NIL)             ; returns #(NIL)
    (vector 'a () 4 "s")     ; returns #(A NIL 4 "s")

See the vector function in the XLISP 2.0 manual.

Back to Top

Nyquist / XLISP 2.0 - Contents | Tutorials | Examples | Reference