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) |
(* ... *) | commenting (nestable) |
< > <= >= | comparison |
= <> | equality / inequality (deep) |
( ... ) | grouping expressions |
[_a-z][_a-zA-Z0-9']* | tokens (variable identifier regexp) |
:= | variable assignment or declaration (assignment) |
let val v = e in | variable assignment or declaration (declaration) |
Unknown:
documentation comment
information about the current line and file
tokens (case-sensitivity (keywords, variable identifiers...))
tokens (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() | function call (with no parameter) |
o | function composition |
fun f para1 para2 = ... | function definition |
no syntax needed(1) | function return value (function body is the result) |
Unknown:
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 ">")
identity function
a handle exn => ... | exception (catching) |
raise | exception (throwing) |
if c then b1 else b2 | if_then_else |
while c do ... | loop (while condition do something) |
case val of v1 => ... | v2 => ... | _ => ... | multiple selection (switch) |
; | sequence |
: | annotation (or variable declaration) |
type n = t | declaration |
datatype n = t | declaration |
constness is the default | mutability, constness (type of a constant value) |
T ref | mutability, constness (type of a mutable value) |
. | package scope |
Unknown:
declare
import
sub | accessing n-th character |
chr | ascii to character |
#"z" | character "z" |
ord | character to ascii |
char | character type name |
substring | extract a substring |
simple print (on strings) | |
^ | string concatenation |
= <> | string equality & inequality |
size | string size |
"..." | strings (with no interpolation of variables) |
string | type name |
Unknown:
strings (end-of-line (without writing the real CR or LF character))
multi-line
serialize (marshalling)
unserialize (un-marshalling)
upper / lower case character
uppercase / lowercase / capitalized string
locate a substring
locate a substring (starting at the end)
false | false value |
not(2) | logical not |
or / and | logical or / and (non short circuit (always evaluates both arguments)) |
orelse / andalso | logical or / and (short circuit) |
true | true value |
bool | 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(3) | is the predicate true for every element |
filter | keep elements (matching) |
@ | list concatenation |
[ a, b, c ](4) | list constructor |
concat | list flattening (one level depth) |
zip | list of couples from 2 lists |
length | list size |
partition | partition a list: elements matching, elements non matching |
rev | reverse |
map | transform a list (or bag) in another one |
ListPair.map | transform two lists in parallel |
a list | type name |
Unknown:
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
split a list
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
datatype typ = N1 | N2 | ... | enumerated type declaration |
NONE | optional value (null value) |
option | optional value (type name) |
SOME v | optional value (value) |
#field r | record (selector) |
type typ = { n1 : typ1; n2 : typ2 } | record (type declaration) |
:= | reference (pointer) (assigning (when dereferencing doesn't give a lvalue)) |
ref | reference (pointer) (creation) |
!(5) | reference (pointer) (dereference) |
( a, b, c ) | tuple constructor |
typ1 * ... * typn | tuple type |
datatype typ = N1 of typ1 | N2 of typ2 | ... | union type declaration |
Unknown:
optional value (null coalescing)
dictionary (type name)
dictionary (constructor)
dictionary (access)
dictionary (has the key ?)
dictionary (remove by key)
dictionary (list of keys)
dictionary (list of values)
dictionary (merge)
range
~ | bitwise operators (bitwise inversion) |
IntInf.quotrem | euclidean division (both quotient and modulo) |
pow | exponentiation (power) |
log | logarithm (base 10) |
ln | logarithm (base e) |
mod | modulo (modulo of -3 / 2 is 1) |
~ | negation |
sqrt / exp / abs | square root / e-exponential / absolute value |
sin / cos / tan | trigonometry (basic) |
/ round / floor / ceil | truncate / round / floor / ceil |
float | type name (floating point) |
int | type name (integers) |
Unknown:
numbers syntax (integers)
numbers syntax (integers in base 2, octal and hexadecimal)
numbers syntax (floating point)
addition / subtraction / multiplication / division
random (random number)
random (seed the pseudo random generator)
operator priorities and associativities
trigonometry (inverse)