VSLisp core library contains it's own Lisp dialect. All it's functions will be explained in this chapter.
l <-- (list x1 [x2 [x3 ...]]) - Create a new list from elements x1,
x2, x3.
x <-- (car l) - Get list's head or NIL.
x <-- (cdr l) - Get list's tail or NIL.
x <-- (nth n l) - Get numbered list element. First element is 0.
l <-- (cons l1 l2) - Create a list with head l1 and tail l2.
l <-- (append l x) - Append x to l's last tail's head.
Example:Lisp>> (append '(a b c) '(d e f)) << ( a b c ( d e f))
l <-- (append1 l x) - Connect x to l's last tail.
Example:Lisp>> (append1 '(a b c) '(d e f)) << ( a b c d e f)
x1 <-- (setq qa x1) - Define symbol a in global table, and
set it's value to x1. Symbol name is quoted.
x1 <-- (set x x1) - The same as setq, but symbol name
evaluated.
x1 <-- (setql qa x1 [t]) - Define symbol in local table, or in
specified table.
x1 <-- (setl x x1 [t]) - The same as setql, but symbol
name evaluated.
t <-- (stab n) - Create symbol table with maximum size n.
(atab y) - Append symbol table to local table.
Example:Here(defun f (x) (atab (stab 3)) (setql t (+ x 2)) (/ x t) )(atab (stab ...))construction is a something like local variables definition in C function.
x <-- (eval l) - Evaluate list l. Note - eval works in
current context, not like eval in Common Lisp.
c <-- (symbolp a) - Check is a a symbol name (global
symbol table)
colors library is defined internally in vslisp4 library,
in LC1 format. Colors named after famous "flavours". It is a
something like OOP implementation for VSLisp, and some common functions
like defun.