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) |
begin | progn |
set! | setq |
eq? | eq |
eqv? | eql |
equal? | equal |
number? | numberp |
zero? | zerop |
pair? | consp |
null? | null |
display | princ |
write | prin1 |
newline | terpri |
(list-tail lst n) | (nthcdr n lst) |
(list-ref lst n) | (nth n lst) |
subset? | subsetp |
map | mapcar |
for-each | mapc |
vector-ref | aref |
vector-set! | (setf (aref ...) val) |
substring | subseq |
#t | t |
#f | nil |
'() | '() 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 |