22.lisp Programming
22.lisp Programming
1. Boolean
Description
Atom Returns True if argument is an atom (atom 8)
returns T
LISTP Returns True if argument is an atom (listp list(2 3)
returns T
ZEROP Returns True if argument is zero
ODDP Returns True if argument is an odd
number
EVENP Returns True if argument is an even
number
List Manipulating Functions
The following table provides some commonly used
list manipulating functions.
Input output Functions in LISP
Description Syntax
read Used to take input from the user (write (+3 (read)))
write Returns True if argument is an atom (write(+ 2 3))
print (print “Hello”)
princ (princ “Hello”)
User Defined Function
(defun f1(a b c)
(+ a b c))