The "Unknown:"s below indicate that an entry is incomplete.
/* ... */ | commenting (nestable) |
// | commenting (until end of line) |
< > <= >= | comparison |
min / max | comparison (min / max (binary or more)) |
= ~= | equality / inequality (deep) |
== ~== | equality / inequality (shallow) |
:= | variable assignment or declaration (assignment) |
define | 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)
tokens (variable identifier regexp)
breaking lines (useful when end-of-line and/or indentation has a special meaning)
grouping expressions
block (grouping statements, especially when statements are not expressions)
comparison (returns 3 values (i.e. inferior, equal or superior))
runtime evaluation
force garbage collection
method(a, b) ... end method(1) | anonymous function |
f(a,b,...) | function call |
compose | function composition |
no syntax needed(2) | function return value (function body is the result) |
Unknown:
function call (with no parameter)
partial application (in the examples below, a normal call is "f(a,b)") (give the first argument)
partial application (in the examples below, a normal call is "f(a,b)") (give the second argument)
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
function called when a function is not defined (in dynamic languages)
runtime inspecting the caller information
identity function
block a exception(exn) ... end | exception (catching) |
cleanup | exception (cleanup: code executed before leaving) |
restart | exception (retrying: after catching an exception, tell the snippet to be re-run) |
error | exception (throwing) |
signal | exception (throwing) |
if (c) then ... end | if_then |
if (c) then b1 elseif (c2) then b2 else b3 end | if_then_else |
Unknown:
sequence
multiple selection (switch)
loop (forever loop)
loop (while condition do something)
loop (do something until condition)
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)
loop (for "a la C" (while + initialisation))
breaking control flow (returning a value)
breaking control flow (goto (unconditional jump))
breaking control flow (continue / break)
:: | annotation (or variable declaration) |
Unknown:
declaration
cast
mutability, constness (type of a mutable value)
mutability, constness (type of a constant value)
method(object, para) | method invocation |
method(object) | method invocation (with no parameter) |
Unknown:
object creation
object cloning
manually call an object's destructor
class declaration
testing class membership
get the type/class corresponding to an object/instance/value
methods available
inheritance
has the method
current instance
accessing parent method
Unknown:
package scope
declare
import
as(<string>, e) | convert something to a string (see also string interpolation) |
print(3) | simple print (on any objects) |
puts | simple print (on strings) |
concatenate | string concatenation |
= ~= | string equality & inequality |
"..." | strings (with no interpolation of variables) |
Unknown:
type name
character type name
character "z"
strings (with interpolation of variables)
strings (end-of-line (without writing the real CR or LF character))
multi-line
serialize (marshalling)
unserialize (un-marshalling)
sprintf-like
string size
duplicate n times
upper / lower case character
uppercase / lowercase / capitalized string
ascii to character
character to ascii
accessing n-th character
extract a substring
locate a substring
locate a substring (starting at the end)
#f | false value |
~ | logical not |
| / & | logical or / and (short circuit) |
#t | true value |
anything not false | true value |
Unknown:
type name
pair | adding an element at the beginning (list cons) (return the new list (no side-effect)) |
reduce(4) | f(... f(f(init, e1), e2) ..., en) |
for (v in l) ... | for each element do something |
member? | is an element in the list |
any? | is the predicate true for an element |
every? | is the predicate true for every element |
for (v in l, i from 0) ... end | iterate with index |
choose | keep elements (matching) |
concatenate | list concatenation |
#(a, b, c) | list constructor |
list | list constructor |
map-as(<list>, bag) | list out of a bag |
size | list size |
a[i] | list/array indexing |
element | list/array indexing |
remove-duplicates | remove duplicates |
reverse | reverse |
map | transform a list (or bag) in another one |
map | transform two lists in parallel |
Unknown:
type name
list flattening
adding an element at index
adding an element at the end
first element
all but the first element
last element
get the first element and remove it
get the last element and remove it
find an element
partition a list: elements matching, elements non matching
split a list
smallest / biggest element
join a list of strings in a string using a glue string
sort
list of couples from 2 lists
2 lists from a list of couples
lookup an element in a association list
f(e1, f(e2, ... f(en, init) ...))
h[k] | dictionary (access: read/write) |
define table foo a => b; c => d end | dictionary (constructor) |
range(from: a, to: b, by: step) | range (inclusive .. inclusive) |
normal function call | record (selector) |
Unknown:
tuple type
tuple constructor
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)
reference (pointer) (creation)
reference (pointer) (dereference)
optional value (null value)
optional value (value)
optional value (type name)
optional value (null coalescing)
record (type declaration)
union type declaration
enumerated type declaration
dictionary (type name)
dictionary (has the key ?)
dictionary (remove by key)
dictionary (list of keys)
dictionary (list of values)
dictionary (merge)
floor | euclidean division (both quotient and modulo) |
^ | exponentiation (power) |
modulo | modulo (modulo of -3 / 2 is 1) |
/ round / floor / ceiling | truncate / round / floor / ceil |
Unknown:
type name
numbers syntax (integers)
numbers syntax (integers in base 2, octal and hexadecimal)
numbers syntax (floating point)
addition / subtraction / multiplication / division
negation
random (random number)
random (seed the pseudo random generator)
operator priorities and associativities
square root / e-exponential / absolute value
trigonometry (basic)
trigonometry (inverse)
logarithm (base e)
logarithm (base 10)
bitwise operators