





Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
An introduction to lisp functions, predicates, set operations, and control structures. It covers topics such as defining functions, using conditional statements, and performing set operations on lists. The document also includes examples and explanations of various lisp functions and operators.
Typology: Slides
1 / 9
This page cannot be seen from the preview
Don't miss anything!






> ( reverse L) ; reverses a list (C B A)
> ( length L) ; returns the length of list L 3
List has elements (A B C)
> ( cond (<test-1> <action-1>)
... (<test-k> <action-k>))
> (setf operation ‘area L 100 W 50)
> 50
> (cond ((eq operation ‘perimeter) (* 2 (+ L W)))
(eq operation ‘area) (* L W)) (t ‘i-do-not-understand-this) ) )
> 5000
> (defun y-plus (x) (+ x y)) ;definition of y-plus > (setq y 2) > (y-plus 23) 25