Language Features Covered in CSCI 316
Core Concepts and Data Structures
Section titled “Core Concepts and Data Structures”- Cons cell representation - fundamental list structure in Lisp; lists are built from cons cells. We will convert lists to their cons cell representatoin, and vice versa
NIL=()= only falsey value - the empty list and false are equivalent in Lisp- Lists, atoms, numbers, symbols - basic data types
List Operations
Section titled “List Operations”first,rest,second,car,cdr, composite functions likecaar,caddrlist,append,conslength,null,atom,member,endp- list predicates and operations
Function Definition and Control
Section titled “Function Definition and Control”(defun varname (args) ...)- defining regular named functionssetf- setting variable values- Control flow:
or,and,cond,if,not
Type Checking Predicates
Section titled “Type Checking Predicates”numberp,integerp,realp,evenp,oddp,rationalp,floating-point-psymbolp,plusp,minusp,zerop,typep '<type>,consp,atom
Equality and Comparison
Section titled “Equality and Comparison”eq,eql,equal,=- different equality tests
Variable Binding
Section titled “Variable Binding”let,let*- local variable binding
Functions and Higher-Order Programming
Section titled “Functions and Higher-Order Programming”funcall- calling functions dynamicallylambda- anonymous functions- Sharp quote notation (
#') - reader macro for function references mapcar,remove-if,remove-if-not(in Common Lisp)map,filter(in Scheme)
Set Operations
Section titled “Set Operations”set-difference- set operations on lists