(The code on this page is intended to be illustrative and informative, not rigorous or performant.)

Thin wrappers » typep

Please see enhanced-typep for a much better approach.

(arrayp object)
(typep object 'array)
(atom object)
(typep object 'atom)
(function only)
(complexp object)
(typep object 'complex)
(consp object)
(typep object 'cons)
(floatp object)
(typep object 'float)
(functionp object)
(typep object 'function)
(integerp object)
(typep object 'integer)
(keywordp object)
(typep object 'keyword)
(listp object)
(typep object 'list)
(null object)
(typep object 'null)
(function only)
(numberp object)
(typep object 'number)
(packagep object)
(typep object 'package)
(pathnamep object)
(typep object 'pathname)
(rationalp object)
(typep object 'rational)
(realp object)
(typep object 'real)
(typep (the character character) 'standard-char)
(streamp object)
(typep object 'stream)
(stringp object)
(typep object 'string)
(symbolp object)
(typep object 'symbol)
(vectorp object)
(typep object 'vector)

Thin wrappers » Conses

Thin wrappers » Conses » nth

(first list)
(nth 0 list)
(third list)
(nth 2 list)
(fifth list)
(nth 4 list)
(sixth list)
(nth 5 list)
(ninth list)
(nth 8 list)
(tenth list)
(nth 9 list)

Thin wrappers » Conses » car and cdr

(caar list)
(car (car list))
(cadr list)
(car (cdr list))
(caaar list)
(car (car (car list)))
(caadr list)
(car (car (cdr list)))
(cadar list)
(car (cdr (car list)))
(caddr list)
(car (cdr (cdr list)))
(caaaar list)
(car (car (car (car list))))
(caaadr list)
(car (car (car (cdr list))))
(caadar list)
(car (car (cdr (car list))))
(caaddr list)
(car (car (cdr (cdr list))))
(cadaar list)
(car (cdr (car (car list))))
(cadadr list)
(car (cdr (car (cdr list))))
(caddar list)
(car (cdr (cdr (car list))))
(cadddr list)
(car (cdr (cdr (cdr list))))
(cdar list)
(cdr (car list))
(cddr list)
(cdr (cdr list))
(cdaar list)
(cdr (car (car list)))
(cdadr list)
(cdr (car (cdr list)))
(cddar list)
(cdr (cdr (car list)))
(cdddr list)
(cdr (cdr (cdr list)))
(cdaaar list)
(cdr (car (car (car list))))
(cdaadr list)
(cdr (car (car (cdr list))))
(cdadar list)
(cdr (car (cdr (car list))))
(cdaddr list)
(cdr (car (cdr (cdr list))))
(cddaar list)
(cdr (cdr (car (car list))))
(cddadr list)
(cdr (cdr (car (cdr list))))
(cdddar list)
(cdr (cdr (cdr (car list))))
(cddddr list)
(cdr (cdr (cdr (cdr list))))

Thin wrappers » Conses » Misc

(butlast list n)
(ldiff list (last list n))
(unless list is a dotted list and n is 0)
(push item place)
(setf place (cons item place))
(basically)
(pushnew item place)
(setf place (adjoin item place))
(basically)
(assoc 2 '((1 . "one") (2 . "two") (3 . "three")))
(find-if (lambda (entry)
           (and entry
                (eql (car entry) 2)))
         '((1 . "one") (2 . "two") (3 . "three")))
(rassoc "two" '((1 . "one") (2 . "two") (3 . "three"))
        :test #'string=)
(rassoc-if (lambda (value)
             (string= value "two"))
           '((1 . "one") (2 . "two") (3 . "three")))
subst
TODO
nsubst
TODO
subst-if-not
TODO
nsubst-if-not
TODO

Thin wrappers » Sequences

Thin wrappers » Conditionals

(when condition
  (foo)
  (bar))
(if condition
    (progn
      (foo)
      (bar))
    nil)
(unless condition
  (foo)
  (bar))
(when (not condition)
  (foo)
  (bar))
(cond
  (condition-1 (foo) (bar))
  (condition-2 (baz) (quux)))
(if condition-1
    (progn (foo) (bar))
    (if condition-2
        (progn (baz) (quux))
        nil))
(and (foo) (bar) (baz))
(let ((var1 (foo)))
  (when var1
    (let ((var2 (bar)))
      (when var2
        (baz)))))
(or (foo) (bar) (baz))
(let ((var1 (foo)))
  (if var1
      var1
      (let ((var2 (bar)))
        (if var2
            var2
            (baz)))))
(case (foo)
  (key1
   (bar)
   (baz))
  ((key2 key3)
   (quux)))
(let ((key (foo)))
  (cond
    ((eql key 'key1)
     (bar)
     (baz))
    ((member key '(key2 key3))
     (quux))))
(ccase (foo)
  (key1
   (bar)
   (baz))
  ((key2 key3)
   (quux)))
TODO
(ecase (foo)
  (key1
   (bar)
   (baz))
  ((key2 key3)
   (quux)))
(let ((key (foo)))
  (case key
    (key1
     (bar)
     (baz))
    ((key2 key3)
     (quux))
    (t
     (error 'type-error
            :datum key
            :expected-type '(member key1 key2 key3)))))
(typecase (foo)
  (type1
   (bar)
   (baz))
  (type2
   (quux)))
(let ((key (foo)))
  (cond
    ((typep key 'type1)
     (bar)
     (baz))
    ((typep key 'type2)
     (quux))))
(ctypecase (foo)
  (type1
   (bar)
   (baz))
  (type2
   (quux)))
TODO
(etypecase (foo)
  (type1
   (bar)
   (baz))
  (type2
   (quux)))
(typecase (foo)
  (type1
   (bar)
   (baz))
  (type2
   (quux))
  (t
   (error 'type-error
          :datum key
          :expected-type '(or type1 type2))))
(not generalized-boolean)
(if generalized-boolean nil t)

Thin wrappers » Streams

(princ "foo")
(write "foo" :escape nil :readably nil)

Thin wrappers » Accessor-specializing

Thin wrappers » Math

(1+ number)
(+ number 1)
(1- number)
(- number 1)
(incf place 42)
(setf place (+ place 42))
(basically)
(decf place 42)
(setf place (- place 42))
(basically)

Thin wrappers » Conditions and restarts

TODO
(function only)

Thin wrappers » Misc

(apply function :foo bar keys)
(apply function (list* :foo bar keys))
(tip)
(funcall function (foo) (bar) (baz))
(apply function (list (foo) (bar) (baz)))
(prog1 (foo)
  (bar))
(let ((value (foo)))
  (bar)
  value)
(prog2 (foo) (bar)
  (baz))
(progn
  (foo)
  (let ((value (bar)))
    (baz)
    value))