The "Missing:"s below indicate that an entry is incomplete.
nothing needed | breaking lines (useful when end-of-line and/or indentation has a special meaning) |
#| ... |# | commenting (nestable) |
; | commenting (until end of line) |
< > <= >= | comparison |
min / max | comparison (min / max (binary or more)) |
(defun f (para1 para2) "..." ...) | documentation comment |
equal, 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...)) |
hyphens | tokens (if case sensitive, what is the standard way for scrunching together multiple words) |
setf setq set | variable assignment or declaration (assignment) |
let let* flet labels defun defmethod defvar defparameter defsetf .. | variable assignment or declaration (declaration) |
Missing:
information about the current line and file
tokens (variable identifier regexp)
comparison (returns 3 values (i.e. inferior, equal or superior))
(lambda (a b) ...) | anonymous function |
(f a b ...) (apply f l) (funcall f a b ...) | function call |
(f) (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 from xxx / return | function return value (breaks the control flow) |
no syntax needed | function return value (function body is the result) |
identity | identity function |
Missing:
runtime inspecting the caller information
function composition
/ return from xxx or return | breaking control flow (continue / break) |
go throw | breaking control flow (goto (unconditional jump)) |
return from xxx / return | 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 b) | if_then |
(if c b1 b2) | if_then_else |
(cond (c b1) (c2 b2) (t b3)) | if_then_else |
(loop do expr until cond) | loop (do something until condition) |
(loop do expr) | loop (forever loop) |
(loop while cond do expr) | loop (while condition do something) |
(case val ((v1) expr1) ((v2) expr2) (otherwise expr_else)) | multiple selection (switch) |
(progn ...) (prog1 ...) (prog2 ...) | sequence |
Missing:
loop (for each value in a numeric range, 1 increment (see also the entries about ranges))
loop (for each value in a numeric range, 1 decrement)
loop (for each value in a numeric range, free increment)
(declare (v t)) | 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 |
Missing:
object cloning
manually call an object's destructor
methods available
(defpackage p ...) | declare |
(export 'name1 'name2) | declare (selective export) |
(use-package 'p) | import (everything into current namespace) |
(require 'p) (53) | import (package (ie. load the package)) |
(import '(p:name1 p:name2)) | import (selectively) |
: :: (49) | 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 |
write prin1 princ print | simple print (on any objects) |
write-string | simple print (on strings) |
format (56) | simple print (printf-like) |
format (56) | sprintf-like |
concatenate | string concatenation |
equal, equalp | string equality & inequality |
length | string size |
"~%" (55) | strings (end-of-line (without writing the real CR or LF character)) |
"..." | strings (verbatim) |
char-upcase / char-downcase | upper / lower case character |
string-upcase / string-downcase | uppercase / lowercase / capitalized string |
Missing:
strings (with interpolation)
serialize (marshaling)
unserialize (un-marshaling)
duplicate n times
nil | false value |
not | logical not |
or / and | logical or / and (short circuit) |
t / 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 | 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-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 delete-if | keep elements matching |
(car (last lst)) | last element |
append nconc | list concatenation |
'(a b c) | list constructor |
list | list constructor |
pairlis (76) | list of couples from 2 lists |
length | list size |
nth / aref | list/array indexing |
assoc | lookup an element in a association list |
remove-duplicates delete-duplicates | remove duplicates |
reverse | reverse |
min / max | smallest / biggest element |
sort | sort |
split-sequence (73) | split a list in 2 based on a predicate |
mapcar | transform a list (or bag) in another one |
mapcar | transform two lists in parallel |
Missing:
list flattening
adding an element at index
get the last element and remove it
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 |
Missing:
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)
dictionary (constructor)
range
+ / - / * / / | addition / subtraction / multiplication / division |
logand / logior / logxor (90) | bitwise operators (and / or / xor) |
(ash x positive-integer) / (ash x negative-integer) / | bitwise operators (left shift / right shift / unsigned right shift) |
lognot (91) | bitwise operators (negation) |
floor | euclidian division (both quotient and modulo) |
expt | exponentiation (power) |
log / (89) | logarithm |
mod | modulo (modulo of -3 / 2 is 1) |
- | negation |
1000.0, 1E3 | numbers syntax (decimals) |
#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) |
sqrt / exp / abs | square root / e-exponential / absolute value |
sin / cos / tan | trigonometry (basic) |
asin / acos / atan (88) | trigonometry (inverse) |
truncate / round / floor / ceiling | truncate / round / floor / ceil |
Missing:
random (random number)
random (seed the pseudo random generator)