Scheme vs. Common Lisp

Scheme and Common Lisp use different names for some of the basic system functions. Many Lisp programs can be translated to the other dialect simply by changing these names (or by providing the existing names as macros or functions). Compatibility packages exist to allow programs in one dialect to run in the other dialect.

The following table gives correspondences between Scheme functions and the equivalent Common Lisp functions.

Scheme: Common Lisp:
(define (fn args ...) code) (defun fn (args ...) code)
beginprogn
set!setq
eq?eq
eqv?eql
equal?equal
number?numberp
zero?zerop
pair?consp
null?null
displayprinc
writeprin1
newlineterpri
(list-tail lst n)(nthcdr n lst)
(list-ref lst n)(nth n lst)
subset?subsetp
mapmapcar
for-eachmapc
vector-refaref
vector-set!(setf (aref ...) val)
substringsubseq
#tt
#fnil
'()'() or nil

The following table lists standard Common Lisp functions that are provided in the file initdr.scm.

dotimes
dolist
intersection
union
set-difference
copy-list
subset
every
some
copy-tree
subst
sublis
nconc
nreverse