Language Features Covered in CSCI 316
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
first, rest, second, car, cdr, composite functions like caar, caddr
list, append, cons
length, null, atom, member, endp - list predicates and operations
Function Definition and Control
(defun varname (args) ...) - defining regular named functions
setf - setting variable values
- Control flow:
or, and, cond, if, not
Type Checking Predicates
numberp, integerp, realp, evenp, oddp, rationalp, floating-point-p
symbolp, plusp, minusp, zerop, typep '<type>, consp, atom
Equality and Comparison
eq, eql, equal, = - different equality tests
Variable Binding
let, let* - local variable binding
Functions and Higher-Order Programming
funcall - calling functions dynamically
lambda - 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
set-difference - set operations on lists