[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Axiom-developer] [SExpression] (new)

From: billpage
Subject: [Axiom-developer] [SExpression] (new)
Date: Wed, 07 Dec 2005 01:10:40 -0600

This Axiom domain allows the manipulation of the usual Lisp values.

)show SExpression

Reference: --
An S-expression (S stands for symbolic) is a convention for
representing data structures in a text form. S-expressions are
most commonly used in the Lisp.

S-expressions are used for both code and data in Lisp.
(see McCarthy Recursive Functions of Symbolic Expressions at

S-expressions can either be single objects such as numbers,
LISP atoms including the special atoms nil and t, or cons pairs,
written as (x . y). Longer lists are made up of nested cons pairs,
for example (1 . (2 . (3 . nil))) which can also be written more
intelligibly as (1 2 3).

Program code can be written in S-expressions, using prefix notation.
The common expression (quote x) can be written with the abbreviation

Example in Common Lisp:
(defun factorial (x)
   (if (zerop x) 1
       (* x (factorial (- x 1)))))


forwarded from

reply via email to

[Prev in Thread] Current Thread [Next in Thread]