LISP - Function List


Alphabetic List of Functions
Also called Operators, Macros and Primitives


--A--

ABS

ABS - Absolute Value (ABS -5)
5


AND

ACOS

ACONS

APPEND

APPEND Merges lists

(APPEND `((A B)(C D)))
Answer  (A B C D)



ADJOIN

APPLY

ASSOC

ATOM

ATOM Tests an argument to see if it is an atom

(ATOM `(A B C D))
Answer  NIL

(ATOM `A)
Answer  T




--B--


--C--

CAR

CAR Takes the first element of list

(CAR `(ONE TWO))
Answer  ONE



CDR

CDR Remove the first element of list

(CDR `(ONE TWO THREE))
Answer  TWO THREE

CONS

CONS Adds a new first element to a list

(CONS `A (Q Z))
Answer  (A Q Z)




--D--

DELETE

DEFUN

"DEFine FUNction", use DEFUN to create custom procedures DEFUN Creates user defined functions
Example: (DEFUN ADD2 (x y) (+ x y))
Creates a function called ADD2 that takes two parameters x and y and adds them. To use:
(ADD2 3 4)
Answer  7




--E--

EQUAL

EVAL

EVAL Evaluates and expression:
(EVAL NUMBER)
23



EXPT

EXPT - Calculates Powers (EXPT 3 2)
9



--F--

FIRST

FLOAT

FORMAT

FUNCALL

FUNCTION


--G--

GET


--H--


--I--

IF

INTERN


--J--


--K--

KEYWORDP


--L--

LAMBDA

LAST

LIST

LIST Makes a new list of several lists

(LIST `((A B)(C D)))
Answer  ((A B)(C D))



LISTP

LISTP Tests an argument to see if it is a list

(LISP `(A B C D))
Answer  T

(LISTP `A)
Answer  NIL



LOAD

LOAD or :LD Loading a saved script into the interpreter.

LOOP


--M--

MAPCAR or MAPC

MEMBER or MEMQ

MEMBERP Tests to see if an ATOM is a member of a list.

MAX

MAX - Largest number in sequence (MAX 2 5 6)
5


MIN

MIN - Smallest number in sequence (MIN 2 5 6)
2



--N--

NULL or NOT

NULL Tests to see if an argument is an empty list

(NULL '())
Answer  T

(NULL '(A B C))
Answer  NIL



NIL

NIL Universal false.
Boolean response for "false"



--O--

OR


--P--

PROGN

POP

PUSH

PLUSP

PROG

PRINT

PRINC

PRIN1


--Q--

QUOTE

QUOTE Prints list item(s)

(QUOTE `(COLORS))
Answer  YELLOW RED GREEN



QUIT


--R--

REVERSE

RETURN


--S--

SET or SETQ

SETQ Assigns values:
(SETQ NUMBER `32)

Associates a list with a list name:
(SETQ COLORS `(YELLOW RED GREEN))


SQRT

SQRT - Square Root (SQRT 16)
4.0



--T--

T

T Universal true.
Boolean response for "true"



--U--

UNION

UNTRACE


--V--


--W--

WHEN


--X--


--Y--


--Z--

ZEROP