(arrayp object)
(typep object 'array)
(The code on this page is intended to be illustrative and informative, not rigorous or performant.)
Please see enhanced-typep for a much better approach.
(arrayp object)
(typep object 'array)
(atom object)
(typep object 'atom)
(bit-vector-p object)
(typep object 'bit-vector)
(characterp object)
(typep object 'character)
(compiled-function-p object)
(typep object 'compiled-function)
(complexp object)
(typep object 'complex)
(consp object)
(typep object 'cons)
(floatp object)
(typep object 'float)
(functionp object)
(typep object 'function)
(hash-table-p object)
(typep object 'hash-table)
(integerp object)
(typep object 'integer)
(keywordp object)
(typep object 'keyword)
(listp object)
(typep object 'list)
(null object)
(typep object 'null)
(numberp object)
(typep object 'number)
(packagep object)
(typep object 'package)
(pathnamep object)
(typep object 'pathname)
(rationalp object)
(typep object 'rational)
(readtablep object)
(typep object 'readtable)
(realp object)
(typep object 'real)
(simple-bit-vector-p object)
(typep object 'simple-bit-vector)
(simple-string-p object)
(typep object 'simple-string)
(simple-vector-p object)
(typep object 'simple-vector)
(standard-char-p object)
(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)
(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))))
(butlast list n)
(getf plist indicator default)
(multiple-value-bind (ignored value tail)
(get-properties plist (list indicator))
(if tail value default))
(remprop x y)
(remf (symbol-plist x) y)
(set symbol value)
(setf (symbol-value symbol) value)
(nth n list)
(nreconc list tail)
(revappend list tail)
(push item place)
(pushnew item place)
(setf place (adjoin item place))
(pop place)
(member 2 '(1 2 3))
(member-if-not #'numberp '(1 "two" 3))
(member-if (complement #'numberp) '(1 "two" 3))
(assoc 2 '((1 . "one") (2 . "two") (3 . "three")))
(rassoc-if-not #'characterp
'((1 . "one") (2 . "two") (3 . "three")))
(rassoc-if (complement #'characterp)
'((1 . "one") (2 . "two") (3 . "three")))
subst
TODO
nsubst
TODO
subst-if-not
TODO
nsubst-if-not
TODO
TODO
TODO
TODO
TODO
TODO
TODO
TODO
TODO
TODO
TODO
TODO
TODO
TODO
TODO
(copy-seq sequence)
(subseq sequence 0)
(fill sequence item)
(nsubstitute-if item (constantly t) sequence)
(vector (foo) (bar) (baz))
(make-array 3 :initial-contents (list (foo) (bar) (baz)))
(when condition
(foo)
(bar))
(unless condition
(foo)
(bar))
(cond
(condition-1 (foo) (bar))
(condition-2 (baz) (quux)))
(and (foo) (bar) (baz))
(or (foo) (bar) (baz))
(case (foo)
(key1
(bar)
(baz))
((key2 key3)
(quux)))
(ccase (foo)
(key1
(bar)
(baz))
((key2 key3)
(quux)))
TODO
(ecase (foo)
(key1
(bar)
(baz))
((key2 key3)
(quux)))
(typecase (foo)
(type1
(bar)
(baz))
(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)
TODO
TODO
(with-open-file (stream filename)
(write-line (read-line stream)))
(with-open-stream (stream (open filename))
(write-line (read-line stream)))
(with-open-stream (stream (make-string-input-stream "foo bar"))
(values (read stream) (read stream)))
(let ((stream (make-string-input-stream "foo bar")))
(unwind-protect (values (read stream) (read stream))
(close stream)))
(read-from-string "(1 2)")
(let (index)
(values (with-input-from-string (stream "(1 2)" :index index)
(read stream))
index))
(write-string foo stream)
(write-sequence (the string foo) stream)
(write-line "foo")
(prog1 (write-string "foo") (terpri))
(with-input-from-string (stream "foobar" :start 0 :end 3)
(read-line stream))
(with-open-stream (stream (make-string-input-stream "foobar" 0 3))
(read-line stream))
(with-output-to-string (stream)
(princ "foo" stream))
(with-open-stream (stream (make-string-output-stream))
(princ "foo" stream)
(get-output-stream-string stream))
(write-to-string object)
(with-output-to-string (stream)
(write object :stream stream))
(prin1-to-string object)
(with-output-to-string (stream)
(prin1 object stream))
(princ-to-string object)
(with-output-to-string (stream)
(princ object stream))
(pprint "foo")
(prin1 "foo")
(write "foo" :escape t)
(print "foo")
(let ((object "foo"))
(terpri)
(prin1 object)
(write-char #\Space)
object)
(princ "foo")
(write "foo" :escape nil :readably nil)
(terpri)
(write-char #\Newline)
(bit bit-array i j k)
(sbit bit-array i j k)
(aref (the (simple-array bit) bit-array) i j k)
(char string index)
(schar simple-string 0)
(aref (the simple-string simple-string) 0)
(svref simple-vector 0)
(aref (the simple-vector simple-vector) 0)
(1+ number)
(+ number 1)
(1- number)
(- number 1)
(incf place 42)
(decf place 42)
(evenp integer)
(oddp integer)
(logbitp k n)
(logtest x y)
(mask-field bytespec integer)
(signum number)
(minusp real)
(< real 0)
(zerop number)
(= number 0)
(plusp real)
(> real 0)
(phase number)
TODO
TODO
TODO
(let ((restart (find-restart 'continue)))
(when restart
(invoke-restart restart)))
TODO
TODO
TODO
TODO
(apply function :foo bar keys)
(alphanumericp character)
(or (alpha-char-p character)
(not (null (digit-char-p character))))
(array-dimension array dimension)
(nth dimension (array-dimensions array))
(array-rank array)
(length (array-dimensions array))
(array-total-size array)
(reduce #'* (array-dimensions array))
(char= char1 char2)
(character object)
(constantly t)
(copy-symbol symbol)
(make-symbol (symbol-name symbol))
TODO
(defparameter *var* value)
(progn
(declaim (special *var*))
(setf (symbol-value '*var*) value)
'*var*)
(defvar *var* value)
(progn
(declaim (special *var*))
(unless (boundp '*var*)
(setf (symbol-value '*var*) value))
'*var*)
(defun my-function ())
(setf (fdefinition 'my-function) (lambda ()))
(find-all-symbols "SYMBOL")
(delete-duplicates
(mapcan (lambda (package)
(let ((found (find-symbol "SYMBOL" package)))
(when found
(list found))))
(list-all-packages)))
(funcall function (foo) (bar) (baz))
(in-package #:foo)
(integer-length integer)
(lambda ())
#'(lambda ())
(multiple-value-list form)
(multiple-value-call #'list form)
TODO
(prog1 (foo)
(bar))
(let ((value (foo)))
(bar)
value)
(prog2 (foo) (bar)
(baz))
(return (foo))
(return-from nil (foo))
(values-list list)
TODO
TODO