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) |
< > <= >= | comparison |
= <> | equality / inequality (deep) |
( ... ) | grouping expressions |
[_a-z][_a-zA-Z0-9']* | tokens (variable identifier regexp) |
= | variable assignment or declaration (declaration) |
Missing:
documentation comment
information about the current line and file
tokens (case-sensitivity (keywords, variable identifiers...))
tokens (if case sensitive, what is the standard way for scrunching together multiple words)
comparison (returns 3 values (i.e. inferior, equal or superior))
comparison (min / max (binary or more))
force garbage collection
f a | partial application (in the examples below, a normal call is "f(a,b)") (give the first argument) |
fn (a, b) => ... | anonymous function |
f a b ... | function call |
f() (21) | function call (with no parameter) |
o | function composition |
no syntax needed | function return value (function body is the result) |
Missing:
partial application (in the examples below, a normal call is "f(a,b)") (give the first argument to operator ">")
partial application (in the examples below, a normal call is "f(a,b)") (give the second argument to operator ">")
function definition
identity function
a handle exn => b | exception (catching) |
raise | exception (throwing) |
if c then b1 else b2 | if_then_else |
while cond do expr | loop (while condition do something) |
case val of v1 => expr1 | v2 => expr2 | _ => expr_else | multiple selection (switch) |
; | 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)
: | annotation (or variable declaration) |
type n = t | declaration |
datatype n = t | declaration |
it is the default | mutability, constness (type of a constant value) |
T ref | mutability, constness (type of a mutable value) |
. | package scope |
Missing:
declare
import
sub | accessing n-th character |
chr | ascii to character |
ord | character to ascii |
substring | extract a substring |
simple print (on strings) | |
^ | string concatenation |
= <> | string equality & inequality |
size | string size |
"..." | strings (verbatim) |
Missing:
type name
character type name
character "z"
strings (with interpolation)
strings (end-of-line (without writing the real CR or LF character))
multi-line
serialize (marshaling)
unserialize (un-marshaling)
upper / lower case character
uppercase / lowercase / capitalized string
locate a substring
locate a substring (starting at the end)
false | false value |
not | logical not |
or / and | logical or / and (non short circuit (always evaluates both arguments)) |
orelse / andalso | logical or / and (short circuit) |
true | true value |
Missing:
type name
unzip | 2 lists from a list of couples |
:: | adding an element at the beginning (list cons) (return the new list (no side-effect)) |
foldl | f(... f(f(init, e1), e2) ..., en) |
foldr | f(e1, f(e2, ... f(en, init) ...)) |
find | find an element |
app | for each element do something |
exists | is the predicate true for an element |
all | is the predicate true for every element |
filter | keep elements matching |
@ | list concatenation |
[ a, b, c ] | list constructor |
concat | list flattening (one level depth) |
zip | list of couples from 2 lists |
length | list size |
rev | reverse |
partition | split a list in 2 based on a predicate |
map | transform a list (or bag) in another one |
ListPair.map | transform two lists in parallel |
Missing:
type name
list/array indexing
adding an element at index
first element
all but the first element
last element
get the first element and remove it
get the last element and remove it
is an element in the list
smallest / biggest element
join a list of strings in a string using a glue string
iterate with index
remove duplicates
sort
lookup an element in a association list
#field r | record selector |
:= | reference (pointer) (assigning (when dereferencing doesn't give a lvalue)) |
ref | reference (pointer) (creation) |
! (78) | reference (pointer) (dereference) |
( a, b, c ) | tuple constructor |
Missing:
tuple type
optional value (null value)
optional value (value)
optional value (type name)
dictionary (type name)
dictionary (constructor)
dictionary (access)
dictionary (has the key ?)
dictionary (remove by key)
dictionary (list of keys)
dictionary (list of values)
range
IntInf.quotrem | euclidian division (both quotient and modulo) |
pow | exponentiation (power) |
ln / log | logarithm |
mod | modulo (modulo of -3 / 2 is 1) |
sqrt / exp / abs | square root / e-exponential / absolute value |
sin / cos / tan | trigonometry (basic) |
/ round / floor / ceil | truncate / round / floor / ceil |
Missing:
type name
numbers syntax (integers)
numbers syntax (integers in base 2, octal and hexadecimal)
numbers syntax (integer thousand-seperator)
numbers syntax (decimals)
addition / subtraction / multiplication / division
negation
random (random number)
random (seed the pseudo random generator)
operator priorities and associativities
trigonometry (inverse)
bitwise operators