The "Unknown:"s below indicate that an entry is incomplete.
nothing needed | breaking lines (useful when end-of-line and/or indentation has a special meaning) |
#| ... |#(1) | commenting (nestable) |
; | commenting (until end of line) |
< > <= >= | comparison |
min / max | comparison (min / max (binary or more)) |
(defun f (para1 para2) "..." ...) | documentation comment |
equal | equality / inequality (deep) |
equalp | equality / inequality (deep) |
eq, eql | equality / inequality (shallow) |
(ext:gc) | force garbage collection |
eval | runtime evaluation |
case-insensitive | tokens (case-sensitivity (keywords, variable identifiers...)) |
anything without a space and is not a number | tokens (variable identifier regexp) |
hyphens | tokens (what is the standard way for scrunching together multiple words) |
setq | variable assignment or declaration (assignment) |
setf | variable assignment or declaration (assignment) |
set | variable assignment or declaration (assignment) |
let let* | variable assignment or declaration (declaration) |
flet labels defun defmethod defvar defparameter defsetf .. | variable assignment or declaration (declaration) |
(lambda (a b) ...) | anonymous function |
(f a b ...) (apply f l) | function call |
(funcall f a b ...) | function call |
(f) | function call (with no parameter) |
(funcall f) | function call (with no parameter) |
no-applicable-method | function called when a function is not defined (in dynamic languages) |
(defun f (para1 para2) ...) | function definition |
return(2) | function return value (breaks the control flow) |
return-from xxx | function return value (breaks the control flow) |
no syntax needed(3) | function return value (function body is the result) |
identity | identity function |
/ return-from xxx or return | breaking control flow (continue / break) |
go throw | breaking control flow (goto (unconditional jump)) |
return(2) | breaking control flow (returning a value) |
return-from xxx | breaking control flow (returning a value) |
handler-bind handler-case ignore-errors | exception (catching) |
unwind-protect | exception (cleanup: code executed before leaving) |
error | exception (throwing) |
signal | exception (throwing) |
cerror warn | exception (throwing) |
(if c ...) | if_then |
(if c b1 b2) | if_then_else |
(cond (c b1) (c2 b2) (t b3)) | if_then_else |
(loop do ... until c) | loop (do something until condition) |
(loop with VAR = INITIAL-VALUE ... while CONDITION finally INCREMENT ...) | loop (for "a la C" (while + initialisation)) |
(loop for i from 1 to 10 by -1 do ...) | loop (for each value in a numeric range, 1 decrement) |
(loop for i from 1 to 10 do ...) | loop (for each value in a numeric range, 1 increment (see also the entries about ranges)) |
(loop for i from 1 to 10 by 2 do ...) | loop (for each value in a numeric range, free increment) |
(loop do ...) | loop (forever loop) |
(loop while c do ...) | loop (while condition do something) |
(case val ((v1) ...) ((v2) ...) (otherwise ...)) | multiple selection (switch) |
(progn ...) (prog1 ...) (prog2 ...) | sequence |
(declare (t v)) | annotation (or variable declaration) |
(deftype n () 't) | declaration |
call-next-method | accessing parent method |
defclass defstruct | class declaration |
dispatching parameter | current instance |
type-of | get the type/class corresponding to an object/instance/value |
find-method | has the method |
(defclass child (parent) ...) | inheritance |
(method object para) | method invocation |
(method object) | method invocation (with no parameter) |
(make-instance class_name ...) | object creation |
typep | testing class membership |
(defpackage p ...) | declare |
(export 'name1 'name2) | declare (selective export) |
(use-package 'p) | import (everything into current namespace) |
(require 'p)(4) | import (package (ie. load the package)) |
(import '(p:name1 p:name2)) | import (selectively) |
: ::(5) | package scope |
char, aref, schar, svref | accessing n-th character |
aref | accessing n-th character |
code-char | ascii to character |
#\z | character "z" |
char-code | character to ascii |
(coerce e 'string) | convert something to a string (see also string interpolation) |
subseq | extract a substring |
search | locate a substring |
(search substring string :from-end t) | locate a substring (starting at the end) |
all strings allow multi-line strings | multi-line |
(with-standard-io-syntax (write obj stream)) | serialize (marshalling) |
write | simple print (on any objects) |
simple print (on any objects) | |
princ prin1 | simple print (on any objects) |
write-string | simple print (on strings) |
format(6) | simple print (printf-like) |
format(6) | sprintf-like |
concatenate | string concatenation |
equal, equalp | string equality & inequality |
length | string size |
"~%"(7) | strings (end-of-line (without writing the real CR or LF character)) |
"..." | strings (with no interpolation of variables) |
(with-standard-io-syntax (read obj stream)) | unserialize (un-marshalling) |
char-upcase / char-downcase | upper / lower case character |
string-upcase / string-downcase | uppercase / lowercase / capitalized string |
nil | false value |
not(8) | logical not |
or / and | logical or / and (short circuit) |
t | true value |
anything not false | true value |
boolean | type name |
cons | adding an element at the beginning (list cons) (return the new list (no side-effect)) |
push | adding an element at the beginning (list cons) (side-effect) |
cdr | all but the first element |
reduce(9) | f(... f(f(init, e1), e2) ..., en) |
(reduce f '(e1 e2 ... en) :from-right t :initial-value init) | f(e1, f(e2, ... f(en, init) ...)) |
find | find an element |
find-if | find an element |
car | first element |
(dolist (v l) ...) (loop for v in l do ...) mapc | for each element do something |
pop | get the first element and remove it |
member | is an element in the list |
some | is the predicate true for an element |
every | is the predicate true for every element |
(loop for v in l as i upfrom 0 do ...) | iterate with index |
remove-if-not delete-if-not | keep elements (matching) |
remove-if delete-if | keep elements (non matching) |
(car (last l)) | last element |
nconc | list concatenation |
append | list concatenation |
'(a b c) | list constructor |
list | list constructor |
pairlis(10) | list of couples from 2 lists |
length | list size |
nth | list/array indexing |
aref | list/array indexing |
assoc | lookup an element in a association list |
delete-duplicates | remove duplicates |
remove-duplicates | remove duplicates |
reverse | reverse |
min / max | smallest / biggest element |
sort(11) | sort |
split-sequence(12) | split a list (into sublists delimited by elements matching a predicate) |
mapcar | transform a list (or bag) in another one |
mapcar | transform two lists in parallel |
Unknown:
list flattening
adding an element at index
get the last element and remove it
partition a list: elements matching, elements non matching
join a list of strings in a string using a glue string
(gethash k h) | dictionary (access: read/write) |
(gethash k h) | dictionary (has the key ?) |
remhash | dictionary (remove by key) |
nil | optional value (null value) |
v | optional value (value) |
normal function call | record (selector) |
(cons a b) | tuple constructor |
Unknown:
computable tuple (these are a kind of immutable lists playing a special role in parameter passing) (empty tuple)
computable tuple (these are a kind of immutable lists playing a special role in parameter passing) (1-uple)
computable tuple (these are a kind of immutable lists playing a special role in parameter passing) (using a tuple for a function call)
optional value (null coalescing)
dictionary (constructor)
dictionary (merge)
range
+ / - / * / / | addition / subtraction / multiplication / division |
logand / logior / logxor(13) | bitwise operators (and / or / xor) |
lognot(14) | bitwise operators (bitwise inversion) |
(ash x positive-integer) / (ash x negative-integer) / | bitwise operators (left shift / right shift / unsigned right shift) |
floor | euclidean division (both quotient and modulo) |
expt | exponentiation (power) |
(log x 10) | logarithm (base 10) |
log | logarithm (base e) |
mod | modulo (modulo of -3 / 2 is 1) |
- | negation |
1000.0, 1E3 | numbers syntax (floating point) |
#b1, #o7, #xf | numbers syntax (integers in base 2, octal and hexadecimal) |
#2r1, #8r7, #16rf | numbers syntax (integers in base 2, octal and hexadecimal) |
1000, 1000. | numbers syntax (integers) |
random | random (random number) |
make-random-state | random (seed the pseudo random generator) |
sqrt / exp / abs | square root / e-exponential / absolute value |
sin / cos / tan | trigonometry (basic) |
asin / acos / atan(15) | trigonometry (inverse) |
truncate / round / floor / ceiling | truncate / round / floor / ceil |