Alphabetical functor index
(total: 191)
version: 0.5.4
[ Functors dictionary | Functors by category | Functors by type ]

a_dims

List of array dimensions.

[ Array ]

a_dims (Arr: Array) List


Returns list of dimensions of array Arr (same order, as in a_create).
 

| a_elem >


a_elem

Array element accessor.

[ Array | Mutable ]

a_elem (Arr: Array, Index: List) Mut


Returns mutable reference to element of array Arr with list of indexes Index.
(Inner indexes are first; outer indexes are last.)
 

< a_dims | a_fill >


a_fill

Fill array with value.

[ Array | Mutator ]

a_fill (Arr: Array, Elem: Any) Array


Fills entire array Arr with value of Elem.
Returns array Arr.
 

< a_elem | a_init_all >


a_init_all

Array functional initializer.

[ Array | Mutator ]

a_init_all (Arr: Array, FnVal: Func) ()


Initializes all elements of array Arr by using functor reference FnVal.
(Each element is initialised by FnVal ! Dims, where Dims is list of elements dimensions.)
 

< a_fill | a_load >


a_load

Load array elements from list of values.

[ Array ]

a_load (Arr: Array, Elems: List) Array


Loads array Arr with list of Elems (according to internal elements ordering).
(Extra elements are ignored).
Returns array Arr.
 

< a_init_all | a_rank >


a_rank

Rank of array.

[ Array ]

a_rank (Arr: Array) Int


Returns rank (number of dimensions) of array Arr.
 

< a_load | a_save >


a_save

Save array elements to list of values.

[ Array ]

a_save (Arr: Array) List


Returns contents of array Arr (according to internal elements ordering) as list.
(Final undefined elements are NOT included.)
 

< a_rank | a_total >


a_total

Total elements in array.

[ Array ]

a_total (Arr: Array) Int


Returns total number of elements in array Arr.
 

< a_save | abs >


abs

Numeric absolute value.

[ Scalar | Unary | Numeric ]

abs (A: Num) Num


Arithmetic absolute value of numeric argument.
(Equals to (A >= 0 ? A : -A), but with A evaluated once).
 

< a_total | acos >


acos

Numeric arccosine.

[ Scalar | Unary | Numeric ]

acos (X: Float) Float


ArcCosine of X (with result in radians).
 

< abs | add >


add

Numeric addition.

[ Scalar | Binary | Numeric ]

add (A: Num, B: Num) Num


Arithmetic addition of arguments: A + B.
 

< acos | and >


and

Bitwise conjunction.

[ Scalar | Binary | Numeric ]

and (I: Int, J: Int) Int


Bitwise AND of arguments: I & J.
 

< add | ang >


ang

Numeric polar angle.

[ Scalar | Binary | Numeric ]

ang (X: Num, Y: Num) Num


Polar angle of point (X, Y), with result in radians.
 

< and | apply >


apply

[ Func ]

apply (F: Func, Arg: Any) Any


Invokes functor reference F with argument(s) Arg (returning result of invocation).
 

< ang | array >


array

Array constructor.

[ Array | Constructor ]

array (Dims: List) Array


Creates new array, with dimensions specified by list Dims.
(Inner dimensions are first; outer dimensions are last).
(Elements of created array are undefined.)
 

< apply | asin >


asin

Numeric arcsine.

[ Scalar | Unary | Numeric ]

asin (X: Float) Float


ArcSine of X (with result in radians).
 

< array | atan >


atan

Numeric arctangent.

[ Scalar | Unary | Numeric ]

atan (X: Float) Float


ArcTangent of X (with result in radians).
 

< asin | c_and >


c_and

Conditional "and" operation.

[ Conditional | Binary ]

c_and (Cond: Bool, @Body: Any) 0 | Any


Conditional "short-circuit" AND operation: if boolean condition Cond is true, evaluates and returns Body; otherwise returns false (0).
Equivalent to: if (Cond, Body, 0).
 

< atan | c_not >


c_not

Conditional "not" operation.

[ Conditional | Unary ]

c_not (Cond: Bool) Bool


Conditional NOT operation: if boolean condition Cond is false, returns true; otherwise false.
 

< c_and | c_or >


c_or

Conditional "or" operation.

[ Conditional | Binary ]

c_or (Cond: Bool, @Body: Any) 1 | Any


Conditional "short-circuit" OR operation: if boolean condition Cond is false, evaluates and returns Body; otherwise returns true (1).
Equivalent to: unless (Cond, Body, 1).
 

< c_not | ceil >


ceil

Numeric rounding up.

[ Scalar | Unary | Numeric ]

ceil (X: Float) Float


Arithmetic "ceiling" value (round X up to nearest integer).
 

< c_or | class_of >


class_of

Class of object.

[ Object ]

class_of (Obj: Object) Class


Evaluates Obj, and returns class to which it belongs (or undef, if Obj is not an object).
 

< ceil | cmp >


cmp

Numeric signed comparison.

[ Scalar | Compare | Numeric ]

cmp (A: Num, B: Num) Sign


Arithmetic signed compare: A < B ? -1 : A > B ? 1 : 0 (A and B evaluated once).
 

< class_of | comb >


comb

Implements combined assignment.

[ Mutator | Binary ]

comb (Operation: Term) Scal


Evaluation of assignment combined with unary/binary term Operation.
 

< cmp | cos >


cos

Numeric cosine.

[ Scalar | Unary | Numeric ]

cos (X: Float) Float


Cosine of X (with argument in radians).
 

< comb | cosh >


cosh

Numeric hyperbolic cosine.

[ Scalar | Unary | Numeric ]

cosh (X: Float) Float


Hyperbolic Cosine of X.
(Equals to: (exp(X) + exp(-X)) / 2).
 

< cos | dc_b >


dc_b

Unsigned byte decode.

[ String | Unary | Decoder ]

dc_b (S: String, [Offset: Int]) Int


Decode (from string to 8 bit unsigned integer): convert 1 byte of string S at offset Offset to unsigned integer.
 

< cosh | dc_l >


dc_l

Long decode.

[ String | Unary | Decoder ]

dc_l (S: String, [Offset: Int]) Int


Decode (from string to 32 bit signed/unsigned integer): convert 4 bytes of string S at offset Offset to integer.
 

< dc_b | dc_sb >


dc_sb

Signed byte decode.

[ String | Unary | Decoder ]

dc_sb (S: String, [Offset: Int]) Int


Decode (from string to 8 bit signed integer): convert 1 byte of string S at offset Offset to signed integer.
 

< dc_l | dc_sw >


dc_sw

Signed word decode.

[ String | Unary | Decoder ]

dc_sw (S: String, [Offset: Int]) Int


Decode (from string to 16 bit signed integer): convert 2 bytes of string S at offset Offset to signed integer.
 

< dc_sb | dc_w >


dc_w

Unsigned word decode.

[ String | Unary | Decoder ]

dc_w (S: String, [Offset: Int]) Int


Decode (from string to 16 bit unsigned integer): convert 2 bytes of string S at offset Offset to unsigned integer.
 

< dc_sw | dec >


dec

Pre-decrement.

[ Mutator | Numeric | Unary ]

dec (V: Mut) Num


Decrements value of mutable V (which must belong to numeric type) by 1.
Returns: value of V after decrement.
 

< dc_w | dec_p >


dec_p

Post-decrement.

[ Mutator | Numeric | Unary ]

dec_p (V: Mut) Num


Decrements value of mutable V (which must belong to numeric type) by 1.
Returns value of V before decrement.
 

< dec | determ >


determ

Deconstruct term to functor and argument(s).

[ Term ]

determ (T: Term) (Func, Any)


Deconstructs term T to list of reference to functor and term argument(s).
(Reverse to enterm).
 

< dec_p | deval >


deval

Expression devaluation.

[ Eval | Unary ]

deval (X: Any) Any


Inhibit evaluation of expression X (returns X itself).
 

< determ | devirt >


devirt

Devirtualize virtual functor.

[ Object ]

devirt (Virt: Virtual, Class: Class) Func


Explicit devirtualization: returns version of virtual Virt defined for class Class.
 

< deval | differ >


differ

Difference check.

[ Compare ]

differ (V: Any, W: Any) Bool


Check expressions V and W for difference: false, if both operands evaluate to same result; true otherwise.
 

< devirt | div >


div

Numeric division.

[ Scalar | Binary | Numeric ]

div (X: Float, Y: Float) Float


Arithmetic division of arguments: X / Y.
 

< differ | do_until >


do_until

Loop with negative postcondition.

[ Iterator | Conditional | Binary ]

do_until (@Cond: Bool, @Body: Any) Any


Negative postconditional iterator:
repeatedly pre-evaluates Body, while Cond remains false.
Returns final value of Body (which is always evaluated at least once).
 

< div | do_while >


do_while

Loop with positive postcondition.

[ Iterator | Conditional | Binary ]

do_while (@Cond: Bool, @Body: Any) Any


Positive postconditional iterator:
repeatedly pre-evaluates Body, while Cond remains true.
Returns final value of Body (which is always evaluated at least once).
 

< do_until | ec_b >


ec_b

Byte encode.

[ String | Unary | Encoder ]

ec_b (Code: Int) Str


Encode (from 8 bit signed/unsigned to length 1 string): convert integer Code to string.
 

< do_while | ec_l >


ec_l

Long encode.

[ String | Unary | Encoder ]

ec_l (Code: Int) Str


Encode (from 32 bit signed/unsigned to length 4 string): convert integer Code to string.
 

< ec_b | ec_w >


ec_w

Word encode.

[ String | Unary | Encoder ]

ec_w (Code: Int) Str


Encode (from 16 bit signed/unsigned to length 2 string): convert integer Code to string.
 

< ec_l | enterm >


enterm

Construct term from functor and argument(s).

[ Term ]

enterm (F: Func, V: Any) Term


Constructs new term from reference to functor F with argument(s) V.
(Reverse to determ).
 

< ec_w | eq >


eq

Numeric equality.

[ Scalar | Compare | Numeric ]

eq (A: Num, B: Num) Bool


Arithmetic equality test: true, if A == B.
 

< enterm | eval_r >


eval_r

[ Eval | Unary ]

eval_r (X: Mut) Mut


Internal: R-mode evaluation of mutable expression X.
 

< eq | eval_v >


eval_v

[ Eval | Unary ]

eval_v (X: Any) Any


Internal: V-mode evaluation of expression X.
 

< eval_r | eval_x >


eval_x

[ Eval | Unary ]

eval_x (X: Any) Any


Internal: X-mode evaluation of expression X.
 

< eval_v | exp >


exp

Numeric exponentiation.

[ Scalar | Unary | Numeric ]

exp (X: Float) Float


Exponent of X: e raised to power X.
 

< eval_x | exp_by >


exp_by

Numeric rise to power.

[ Scalar | Binary | Numeric ]

exp_by (X: Float, Y: Float) Float


X raised to the power Y.
(Same as: exp (log(X) * Y) ).
 

< exp | f_err >


f_err

Standard error output.

[ Stream | Nullary ]

f_err () Stream


Returns default error output stream.
 

< exp_by | f_get >


f_get

Get line(s) from stream as strings.

[ Stream ]

f_get ([In: Stream], { Line: Mut, } ...) Int


Reads lines from the input stream In (or default input, if In is undefined).
Assigns read strings to mutables from list of Line.
Returns: number of lines successfully read.
 

< f_err | f_in >


f_in

Standard input.

[ Stream | Nullary ]

f_in () Stream


Returns default input stream.
 

< f_get | f_out >


f_out

Standard output.

[ Stream | Nullary ]

f_out () Stream


Returns default output stream.
 

< f_in | f_put >


f_put

Put value(s) to stream as strings.

[ Stream ]

f_put ([Out: Stream], { Value: Any, } ...) Int


Evaluates and writes values from list of Value
to the output stream Out (or default output, if Out is omitted).
Returns number of values successfully written.
 

< f_out | false >


false

Literal false value.

[ Scalar | Nullary | Conditional ]

false () Int


Returns false value (0).
 

< f_put | float >


float

Coerce scalar to float.

[ Scalar | Coercion | Numeric ]

float (V: Scal) Float


Explicit float coercion: from scalar V to float value (according to default coercion rules).
 

< false | floor >


floor

Numeric rounding down.

[ Scalar | Unary | Numeric ]

floor (X: Float) Float


Arithmetic "floor" value (round X down to nearest integer).
 

< float | for_dec >


for_dec

Loop decrementing index in range.

[ Iterator | Ternary ]

for_dec (Index: Mut, R: Range, @Body: Any) Any


Decremental sequence iterator: decrements value of mutable Index, from (excluding) end of range R down to (including) start of range R.
On each iteration, Body is evaluated.
Returns final value of Body (or undef, if Body never was evaluated).
 

< floor | for_inc >


for_inc

Loop incrementing index in range.

[ Iterator | Ternary ]

for_inc (Index: Mut, R: Range, @Body: Any) Any


Incremental sequence iterator: increments value of mutable Index, from (including) start of range R up to (excluding) end of range R.
On each iteration, Body is evaluated.
Returns final value of Body (or undef, if Body never was evaluated).
 

< for_dec | ge >


ge

Numeric "greater than or equal" compare.

[ Scalar | Compare | Numeric ]

ge (A: Num, B: Num) Bool


Arithmetic "greater than/equal" test: true, if A >= B.
 

< for_inc | gt >


gt

Numeric "greater than" compare.

[ Scalar | Compare | Numeric ]

gt (A: Num, B: Num) Bool


Arithmetic "greater than" test: true, if A > B.
 

< ge | h_clear >


h_clear

Clear hash.

[ Hash ]

h_clear (Hsh: Hash) Int


Clears hash Hsh.
Returns number of keys/values, which were present in hash.
 

< gt | h_count >


h_count

Hash counter.

[ Hash ]

h_count (Hsh: Hash) Int


Returns total number of key/value pairs in hash Hsh.
 

< h_clear | h_elem >


h_elem

Hash value accessor.

[ Hash | Mutable ]

h_elem (Hsh: Hash, Key: Any) Mut


Returns mutable reference to value associated with Key in hash Hsh.
(If Key was not in Hsh, it is created with undefined initial value).
 

< h_count | h_inspect >


h_inspect

Inspect hash internals.

[ Hash ]

h_inspect (Hsh: Hash) List


Returns list of internal bucket capacities in hash Hsh.
 

< h_elem | h_keys >


h_keys

List of hash keys.

[ Hash ]

h_keys (Hsh: Hash) List


Return list of all hash keys (in unpredictable order).
 

< h_inspect | h_lookup >


h_lookup

Hash value lookup.

[ Hash ]

h_lookup (Hsh: Hash, Key: Any) Any


Returns value associated with Key in hash Hsh.
(If Key is not in Hsh returns undef; new key is NOT created).
 

< h_keys | h_loop >


h_loop

Hash iterator

[ Hash | Iterator ]

h_loop (Hsh: Hash, Var: Mut, @Body: Any) Any


Iterates through hash Hsh.
On each iteration, list of (key, value) is assigned to mutable Var and Body is evaluated.
Returns result of final evaluation of Body.
Keys/values order is unpredictable.
 

< h_lookup | h_rehash >


h_rehash

Change hash capacity.

[ Hash ]

h_rehash (Hsh: Hash, Capacity: Int) Int


Change capacity of hash Hsh to Capacity (preserving hash contents).
Returns current number of hash entries.
 

< h_loop | h_remove >


h_remove

Hash value remove.

[ Hash ]

h_remove (Hsh: Hash, Key: Any) Any


Removes value associated with Key from hash Hsh.
(Returns removed value; or undef, if there was no value with Key).
 

< h_rehash | h_values >


h_values

List of hash values.

[ Hash ]

h_values (Hsh: Hash) List


Return list of all hash values (in unpredictable order).
 

< h_remove | hash >


hash

Hash constructor.

[ Hash | Constructor ]

hash ([Capacity: Int]) Hash


Creates new hash (with optional initial Capacity).
(Created hash is empty.)
 

< h_values | hcode >


hcode

Hash code.

[ ]

hcode (V: Any) Int


Calculate hash code of result of V.
 

< hash | ident >


ident

Identity check.

[ Compare ]

ident (V: Any, W: Any) Bool


Check expressions V and W for identity: true, if both operands evaluate to same result; false otherwise.
 

< hcode | idiv >


idiv

Integer ratio.

[ Scalar | Binary | Numeric ]

idiv (I: Int, J: Int) Int


Integer division of arguments: I % J.
(Same as int(I / J), rounding result towards 0).
 

< ident | if >


if

Conditional choice (positive).

[ Conditional | Ternary ]

if (Cond: Bool, @Then: Any1, @Else: Any2) Any1 | Any2


Positive conditional test: if boolean Cond is true, evaluates and returns Then; otherwise evaluates and returns Else.
 

< idiv | inc >


inc

Pre-increment.

[ Mutator | Numeric | Unary ]

inc (V: Mut) Num


Increments value of mutable V (which must belong to numeric type) by 1.
Returns: value of V after increment.
 

< if | inc_p >


inc_p

Post-increment.

[ Mutator | Numeric | Unary ]

inc_p (V: Mut) Num


Increments value of mutable V (which must belong to numeric type) by 1.
Returns: value of V before increment.
 

< inc | include >


include

Include module.

[ System ]

include (Filename: String) Int


Include module Filename (evaluating all source-level constructs in module).
 

< inc_p | inside >


inside

Check for value inside range.

[ Numeric | Predicate ]

inside (Value: Int, R: Range) Bool


True, if integer Value is inside range R
(R[0] <= Value && Value < R[1]).
 

< include | int >


int

Coerce scalar to integer.

[ Scalar | Coercion | Numeric ]

int (V: Scal) Int


Explicit integer coercion: from scalar V to integer value (according to default coercion rules).
 

< inside | irem >


irem

Integer remainder.

[ Scalar | Binary | Numeric ]

irem (I: Int, J: Int) Int


Integer remainder of arguments: I %% J.
(Same as I - J * (I % J)).
 

< int | is_array >


is_array

Check for array value.

[ Predicate | Array ]

is_array (V: Any) Bool


Predicate: true, if argument V evaluates to array.
 

< irem | is_block >


is_block

Check for block.

[ Predicate ]

is_block (V: Any) Bool


Predicate: true, if argument V evaluates to block.
 

< is_array | is_float >


is_float

Check for float value.

[ Predicate | Numeric ]

is_float (V: Any) Bool


Predicate: true, if argument V evaluates to float scalar.
 

< is_block | is_hash >


is_hash

Check for hash value.

[ Predicate | Hash ]

is_hash (V: Any) Bool


Predicate: true, if argument V evaluates to hash.
 

< is_float | is_int >


is_int

Check for integer value.

[ Predicate | Numeric ]

is_int (V: Any) Bool


Predicate: true, if argument V evaluates to integer scalar.
 

< is_hash | is_list >


is_list

Check for list.

[ Predicate | List ]

is_list (V: Any) Bool


Predicate: true, if argument V evaluates to list.
 

< is_int | is_mut >


is_mut

Check mutability.

[ Predicate ]

is_mut (V: Any) bool


Return true, if V evaluates to mutable result.
 

< is_list | is_num >


is_num

Check for numeric value.

[ Predicate | Numeric ]

is_num (V: Any) Bool


Predicate: true, if argument V evaluates to numeric (int or float) scalar.
 

< is_mut | is_stream >


is_stream

Check for stream.

[ Stream | Predicate ]

is_stream (V: Any) Bool


True, if V evaluates to stream.
 

< is_num | is_string >


is_string

Check for string value.

[ Predicate | String ]

is_string (V: Any) Bool


Predicate: true, if argument V evaluates to string scalar.
 

< is_stream | is_term >


is_term

Check for term.

[ Predicate | Term ]

is_term (V: Any) Bool


Predicate: true, if argument V evaluates to term.
 

< is_string | is_undef >


is_undef

Check for undefined value.

[ Predicate ]

is_undef (V: Any) Bool


Predicate: true, if argument V evaluates to undef.
 

< is_term | is_var >


is_var

Check for variable.

[ Predicate ]

is_var (V: Any) Bool


Predicate: true, if argument V evaluates to variable.
 

< is_undef | l_cat >


l_cat

List concatenation.

[ List ]

l_cat (L: List, M: List) List


List concatenation: concatenates L and M, evaluated as lists: L [+] M.
(Returns L, if M is undef and/or M, if L is undef.)
 

< is_var | l_copy >


l_copy

Copy list.

[ List ]

l_copy (L: List) List


Returns exact copy of list L (including all list elements).
 

< l_cat | l_head >


l_head

List head accessor.

[ List | Mutable ]

l_head (L: List) Mut


Returns mutable reference to head (first item) of list L.
(Same as l_item (0, L)).
 

< l_copy | l_head_by >


l_head_by

Head of list, with offset.

[ List | Mutable ]

l_head_by (N: Int, L: List) Mut


Equivalent of l_head(L) applied N times.
(Returns L, if N == 0.)
 

< l_head | l_item >


l_item

List element accessor.

[ List | Mutable ]

l_item (I: Int, L: List) Mut


Returns mutable reference to item I (starting at 0) of L, evaluated as list.
 

< l_head_by | l_len >


l_len

Length of list.

[ List ]

l_len (L: List) Int


Returns length of list L (total # of list items).
(Returns 1 for scalar values and 0 for undef.)
 

< l_item | l_loop >


l_loop

Direct list iterator.

[ List | Iterator ]

l_loop (V: Mut, L: List, @Body: Any) Any


List iterator (direct): evaluates Body for all items in list L (from first to last).
On each iteration reference to current list item is assigned to mutable V.
Returns result of last evaluation of Body.
 

< l_len | l_loop_r >


l_loop_r

Reverse list iterator.

[ List | Iterator ]

l_loop_r (V: Mut, L: List, @Body: Any) Any


List iterator (reverse): evaluates Body for all items in list L (from last to first).
On each iteration reference to current list item is assigned to mutable V.
Returns result of last evaluation of Body.
 

< l_loop | l_map >


l_map

Map list with functor.

[ List | Func ]

l_map (F: Func, L: List) List


Returns new list, constructed by applying functor F to all elements of list L.
Note: l_map maps open lists to open lists.
 

< l_loop_r | l_pop >


l_pop

Pop elements from list.

[ List | Mutator ]

l_pop (L: Mut, V: Mut) List


Removes (in direct order) elements from list L into mutable list V.
Returns: new value of L.
 

< l_map | l_push >


l_push

Push elements to list.

[ List | Mutator ]

l_push (L: Mut, V: Any) List


Evaluates and inserts (in reverse order) elements of list V into list L.
Returns: new value of L.
 

< l_pop | l_range >


l_range

Range to list (direct).

[ List ]

l_range (R: Range, [F: Func]) List


Constructs and returns new list from integer range R (in ascending order).
If functor F is specified, it is applied to elements during construction.
 

< l_push | l_range_r >


l_range_r

Range to list (reverse).

[ List ]

l_range_r (R: Range, [F: Func]) List


Constructs and returns new list from integer range R (in descending order).
If functor F is specified, it is applied to elements during construction.
 

< l_range | l_ref >


l_ref

Reference to list.

[ List ]

l_ref (L: List) List


Return L, evaluated as list.
 

< l_range_r | l_rep >


l_rep

List replication.

[ List ]

l_rep (N: Int, L: List) List


List replication: replicates L, evaluated as list, N times in succession: L [*] N.
(Returns undef, if N <= 0 or L is undef.)
 

< l_ref | l_rev >


l_rev

List reversion.

[ List ]

l_rev (L: List) List


List reversion: returns reverse (from last element to first) of L, evaluated as list.
 

< l_rep | l_sort_index >


l_sort_index

Build sorted index.

[ List | Func ]

l_sort_index (Comp: Func, R: Range) List


Sort range R, using Comp to compare indexes.
Returns list of indexes as result.
 

< l_rev | l_split >


l_split

Split list at specified position.

[ List | Mutator ]

l_split (N: Int, L: Mut) List


Split list L into parts at position N (mutating L).
For new value of L: l_head(L) [+] l_tail(L) [==] L; l_len(l_head(L)) == N+1.
Returns: new value of L.
 

< l_sort_index | l_tail >


l_tail

List tail accessor.

[ List | Mutable ]

l_tail (L: List) Mut


Returns mutable reference to tail (all items except first) of list L.
 

< l_split | l_tail_by >


l_tail_by

Tail of list, with offset.

[ List | Mutable ]

l_tail_by (N: Int, L: List) Mut


Equivalent of l_tail(L) applied N times.
(Returns L, if N == 0.)
 

< l_tail | l_until >


l_until

Search list forward, negatively testing predicate.

[ List | Func ]

l_until (Predicate: Func, L: List) Int


Scans list (from first element to last), applying functor Predicate to each element, while result remains false.
Returns: index of first element, where Predicate ! L[index] is true
(returns 0, if condition is true on first element; returns length of L, if condition is false for all elements).
 

< l_tail_by | l_until_r >


l_until_r

Search list backward, negatively testing predicate.

[ List | Func ]

l_until_r (Predicate: Func, L: List) Int


Scans list (from last element to first), applying functor Predicate to each element, while result remains false.
Returns: index of last element, where Predicate ! L[index] remains false
(returns length of L, if condition is true on last element; returns 0, if condition is false for all elements).
 

< l_until | l_while >


l_while

Search list forward, positively testing predicate.

[ List | Func ]

l_while (Predicate: Func, L: List) Int


Scans list (from first element to last), applying functor Predicate to each element, while result remains true.
Returns: index of first element, where Predicate ! L[index] is false
(returns 0, if condition is false on first element; returns length of L, if condition is true for all elements).
 

< l_until_r | l_while_r >


l_while_r

Search list backward, positively testing predicate.

[ List | Func ]

l_while_r (Predicate: Func, L: List) Int


Scans list (from last element to first), applying functor Predicate to each element, while result remains true.
Returns: index of last element, where Predicate ! L[index] remains true
(returns length of L, if condition is false on last element; returns 0, if condition is true for all elements).
 

< l_while | le >


le

Numeric "less than or equal" compare.

[ Scalar | Compare | Numeric ]

le (A: Num, B: Num) Bool


Arithmetic "less than/equal" test: true, if A <= B.
 

< l_while_r | let >


let

Lazy assignment.

[ Mutator | Binary ]

let (V: Mut, X: Any) Any


Assigns expression X (not evaluated!) to mutable V.
Returns: V.
 

< le | log >


log

Numeric logarithm.

[ Scalar | Unary | Numeric ]

log (X: Float) Float


Natural (base e) logarithm of X (NAN, if X <= 0).
 

< let | log_by >


log_by

Numeric logarithm by base.

[ Scalar | Binary | Numeric ]

log_by (X: Float, Y: Float) Float


Logarithm of Y base X.
(Same as: log(Y) / log(X) ).
 

< log | lt >


lt

Numeric "less than" compare.

[ Scalar | Compare | Numeric ]

lt (A: Num, B: Num) Bool


Arithmetic "less than" test: true, if A < B.
 

< log_by | max >


max

Numeric maximum.

[ Scalar | Binary | Numeric ]

max (A: Num, B: Num) Num


Arithmetic maximum (greater of arguments): A ?> B.
(Equals to: A > B ? A : B, but evaluates arguments once).
 

< lt | min >


min

Numeric minimum.

[ Scalar | Binary | Numeric ]

min (A: Num, B: Num) Num


Arithmetic minimum (lesser of arguments): A ?< B.
(Equals to: A < B ? A : B, but evaluates arguments once).
 

< max | mul >


mul

Numeric multiplication.

[ Scalar | Binary | Numeric ]

mul (A: Num, B: Num) Num


Arithmetic multiplication of arguments: A * B.
 

< min | ne >


ne

Numeric inequality.

[ Scalar | Compare | Numeric ]

ne (A: Num, B: Num) Bool


Arithmetic inequality test: true, if A <> B.
 

< mul | neg >


neg

Numeric negation.

[ Scalar | Unary | Numeric ]

neg (A: Num) Num


Arithmetic negation of numeric argument: -A.
 

< ne | not >


not

Bitwise complement.

[ Scalar | Unary | Numeric ]

not (I: Int) Int


Bitwise complement of integer argument: ~I.
 

< neg | num >


num

Coerce scalar to number.

[ Scalar | Coercion | Numeric ]

num (V: Scal) Num


Explicit numeric coercion: from scalar V to integer or float value (according to default coercion rules).
 

< not | or >


or

Bitwise disjunction.

[ Scalar | Binary | Numeric ]

or (I: Int, J: Int) Int


Bitwise OR of arguments: I | J.
 

< num | outside >


outside

Check for value outside range.

[ Numeric | Predicate ]

outside (Value: Int, R: Range) Bool


True, if integer Value is outside range R
(Value < R[0] || R[1] <= Value).
 

< or | pi >


pi

Multiply by \Pi.

[ Scalar | Unary | Numeric ]

pi (X: Float) Float


Value of X multiplied by Pi.
 

< outside | rad >


rad

Numeric polar radius.

[ Scalar | Binary | Numeric ]

rad (X: Num, Y: Num) Num


Polar radius of cartesian point (X, Y).
(Same as sqr(X*X + Y*Y)).
 

< pi | rand >


rand

Random numbers generator.

[ Unary | Numeric ]

rand ([N: Int]) Int


Returns next random number, belonging to the range 0..N.
If N is omitted, may return any integer.
 

< rad | randomize >


randomize

Randomizer.

[ Unary | Numeric ]

randomize (Seed: Int) Int


Sets random numbers generator Seed (affecting following values returned by rand).
If Seed is omitted, chooses completely random seed for randomization.
 

< rand | reduce >


reduce

Implements list reduction.

[ List ]

reduce (Operation: Term) Scal


Performs reduction on binary term Operation.
 

< randomize | reval >


reval

Expression revaluation.

[ Eval | Unary ]

reval (X: Any) Any


Evaluate result of evaluation of expression X.
 

< reduce | rx_alt >


rx_alt

Alternation of patterns.

[ Constructor | Pattern ]

rx_alt (First: Pattern, Second: Pattern) Pattern


Construct pattern, matching either First or Second.
 

< reval | rx_any >


rx_any

Any character pattern.

[ Constructor | Pattern ]

rx_any () Pattern


Construct pattern, matching any character.
 

< rx_alt | rx_cat >


rx_cat

Concatenation of patterns.

[ Constructor | Pattern ]

rx_cat (Start: Pattern, End: Pattern) Pattern


Construct pattern, matching Start immediately followed by End.
 

< rx_any | rx_char >


rx_char

Literal character pattern.

[ Constructor | Pattern ]

rx_char (Code: Int) Pattern


Construct pattern, matching single character with code Code.
 

< rx_cat | rx_match >


rx_match

Pattern check.

[ String | Pattern ]

rx_match (Context: Pattern, Str: String) Int


Match Str with pattern Context.
Return length of pattern matched (or -1, if match failed).
 

< rx_char | rx_rep >


rx_rep

Repetition of pattern.

[ Constructor | Pattern ]

rx_rep (Range: Range, Max: Bool, Body: Pattern) Pattern


Construct pattern, matching Body, repeated minimum Range[0] and maximum Range[1] times.
 

< rx_match | rx_string >


rx_string

Literal string pattern.

[ Constructor | Pattern ]

rx_string (Text: Str) Pattern


Construct pattern, matching literal string Text.
 

< rx_rep | s_cat >


s_cat

String concatenation.

[ Scalar | Binary | String ]

s_cat (S: Str, T: Str) Str


String concatenation: returns strings S and T concatenated together.
 

< rx_string | s_cmp >


s_cmp

String signed comparison.

[ Scalar | Compare | String ]

s_cmp (S: Str, T: Str) Sign


String signed compare: returns -1, if S is alphabetically before T; 1, if S is alphabetically after T; 0 if S is equal to T (S and T evaluated once).
 

< s_cat | s_empty >


s_empty

Empty string literal.

[ Scalar | Nullary | String ]

s_empty () Str


Always returns empty string.
 

< s_cmp | s_eq >


s_eq

String equality.

[ Scalar | Compare | String ]

s_eq (S: Str, T: Str) Bool


String equality test: true, if S is identical to T.
 

< s_empty | s_findfirst >


s_findfirst

Search string forward for context.

[ Scalar | Binary | String ]

s_findfirst (S: Str, Ctx: Str) Int


Find first match: searches forward string S, looking for the first occurence of context Ctx.
Returns offset of Ctx in S (starting from 0), or -1, if Ctx was not found.
 

< s_eq | s_findlast >


s_findlast

Search string backward for context.

[ Scalar | Binary | String ]

s_findlast (S: Str, Ctx: Str) Int


Find last match: searches backward string S, looking for the last occurence of context Ctx.
Returns offset of Ctx in S (starting from 0), or -1, if Ctx was not found.
 

< s_findfirst | s_ge >


s_ge

String "greater than or equal" compare.

[ Scalar | Compare | String ]

s_ge (S: Str, T: Str) Bool


String greater than/equal test: true, if S is alphabetically after or equal to T.
 

< s_findlast | s_gt >


s_gt

String "greater than" compare.

[ Scalar | Compare | String ]

s_gt (S: Str, T: Str) Bool


String greater than test: true, if S is alphabetically after T.
 

< s_ge | s_le >


s_le

String "less than or equal" compare.

[ Scalar | Compare | String ]

s_le (S: Str, T: Str) Bool


String less than/equal test: true, if S is alphabetically before or equal to T.
 

< s_gt | s_len >


s_len

Query string length.

[ Scalar | Unary | String ]

s_len (S: Str) Int


Returns length of string S (0, if S is empty).
 

< s_le | s_lt >


s_lt

String "less than" compare.

[ Scalar | Compare | String ]

s_lt (S: Str, T: Str) Bool


String less than test: true, if S is alphabetically before T.
 

< s_len | s_map >


s_map

String mapper.

[ String | Unary ]

s_map (F: Func, S: String) String


Returns new string, created by applying functor F to character codes in string S.
(F is invoked as F ! (OldCode: Int) => NewCode; expected to return Int)
 

< s_lt | s_max >


s_max

String maximum.

[ Scalar | Binary | String ]

s_max (S: Str, T: Str) Str


String maximum: returns either S or T, whichever comes last alphabetically.
 

< s_map | s_min >


s_min

String minimum.

[ Scalar | Binary | String ]

s_min (S: Str, T: Str) Str


String minimum: returns either S or T, whichever comes first alphabetically.
 

< s_max | s_ne >


s_ne

String inequality.

[ Scalar | Compare | String ]

s_ne (S: Str, T: Str) Bool


String inequality test: true, if S is different from T.
 

< s_min | s_rep >


s_rep

String replication.

[ Scalar | Binary | String ]

s_rep (S: Str, N: Int) Str


String replication: returns S replicated N times.
(Returns S, if N == 1 or empty string, if N == 0.)
 

< s_ne | s_retype >


s_retype

Change string type.

[ Scalar | Binary | String ]

s_retype (Type: Bool, S: Str)


Convert string S to characters Type
(0: to ASCII, 1: to Unicode).
Conversion method is environment-dependent.
 

< s_rep | s_slice >


s_slice

String slice.

[ Scalar | Binary | String ]

s_slice (R: Range, S: Str) Str


String slicing: returns fragment of string S sliced by range R.
Range R defaults to entire string (0 .. s_len(S)).
If R exceeds limits (either R[0] < 0 or R[1] > s_len(S)), returned string is padded with spaces at begin and/or end.
Length of result is always R[1] - R[0].
 

< s_retype | s_type >


s_type

Query string type.

[ Scalar | Unary | String ]

s_type (S: Str) Int


Returns type of string S (0 for ASCII string; 1 for Unicode string).
 

< s_slice | self >


self

Current instance of class.

[ Object ]

self ([Class: Class]) Object


Evaluates Class, and returns its current instance (or undef, if Class is not class reference, or have no current instance).
If Class is omitted, returns current instance of current class.
 

< s_type | set >


set

Eager assignment.

[ Mutator | Binary ]

set (V: Mut, X: Any) Any


Assigns result of evaluation of expression X to mutable V.
Returns: assigned value.
 

< self | sgn >


sgn

Numeric sign.

[ Scalar | Unary | Numeric ]

sgn (A: Num) Sign


Arithmetic sign (-1, 0, 1) of numeric argument.
(Equals to (A > 0 ? 1 : A < 0 ? -1 : 0), but with A evaluated once).
 

< set | shl >


shl

Bitwise shift left.

[ Scalar | Binary | Numeric ]

shl (I: Int, J: Int) Int


Arithmetic shift: returns I shifted left by J bits (I << J).
Note: (I << -J == I >> J).
 

< sgn | shr >


shr

Bitwise shift right.

[ Scalar | Binary | Numeric ]

shr (I: Int, J: Int) Int


Arithmetic shift: returns I shifted right by J bits (I >> J).
Note: (I >> -J == I << J).
 

< shl | sin >


sin

Numeric sine.

[ Scalar | Unary | Numeric ]

sin (X: Float) Float


Sine of X (with argument in radians).
 

< shr | sinh >


sinh

Numeric hyperbolic sine.

[ Scalar | Unary | Numeric ]

sinh (X: Float) Float


Hyperbolic Sine of X.
(Equals to: (exp(X) - exp(-X)) / 2).
 

< sin | sqr >


sqr

Numeric square root.

[ Scalar | Unary | Numeric ]

sqr (X: Float) Float


Square root of X (NAN, if X < 0).
 

< sinh | string >


string

Coerce scalar to string.

[ Scalar | Coercion | String ]

string (V: Scal) String


Explicit string coercion: from scalar V to string value (according to default coercion rules).
 

< sqr | sub >


sub

Numeric subtraction.

[ Scalar | Binary | Numeric ]

sub (A: Num, B: Num) Num


Arithmetic subtraction of arguments: A - B.
 

< string | swap >


swap

Exchange values.

[ Mutator ]

swap (V: Mut, W: Mut) ()


Excahnges values of mutables V and W (w/o evaluation).
 

< sub | tan >


tan

Numeric tangent.

[ Scalar | Unary | Numeric ]

tan (X: Float) Float


Tangent of X (with argument in radians).
 

< swap | tanh >


tanh

Numeric hyperbolic tangent.

[ Scalar | Unary | Numeric ]

tanh (X: Float) Float


Hyperbolic Tangent of X.
(Equals to: sinh(X) / cosh(X), or (exp(X) - exp(-X)) / (exp(X) + exp(-X))).
 

< tan | times >


times

Loop for fixed number of iterations.

[ Iterator | Unary ]

times (Count: Int, @Body: Any) Any


Evaluates Body precisely Count times.
Returns final value of Body (or undef, if Body never was evaluated).
 

< tanh | true >


true

Literal true value.

[ Scalar | Nullary | Conditional ]

true () Int


Returns true value (1).
 

< times | unless >


unless

Conditional choice (negative).

[ Conditional | Ternary ]

unless (Cond: Bool, @Else: Any1, @Then: Any2) Any2 | Any1


Negative conditional test: if boolean Cond is false, evaluates and returns Else; otherwise evaluates and returns Then.
 

< true | until >


until

Loop with negative precondition.

[ Iterator | Conditional | Binary ]

until (@Cond: Bool, @Body: Any) Any


Negative preconditional iterator: while boolean Cond remains false, repeatedly evaluates Body.
Returns final value of Body (or undef, if Body never was evaluated).
 

< unless | void >


void

[ Eval | Unary ]

void (X: Any) ()


Void evaluation of expression X (ignore returned value).
 

< until | while >


while

Loop with positive precondition.

[ Iterator | Conditional | Binary ]

while (@Cond: Bool, @Body: Any) Any


Positive preconditional iterator: while boolean Cond remains true, repeatedly evaluates Body.
Returns final value of Body (or undef, if Body never was evaluated).
 

< void | with >


with

Wrapper: Set object current instance.

[ Object | Wrapper ]

with (Obj: Object, @Body: Any) Any


Evaluates Body (and returns result of evaluation), with Obj as temporary current instance of its class.
 

< while | without >


without

Wrapper: Unset object current instance.

[ Object | Wrapper ]

without (Class: Class, @Body: Any) Any


Evaluates Body (and returns result of evaluation), with tempoparily absent current instance of class Class.
 

< with | x_funcs >


x_funcs

Show scope functors/classes.

[ Debug ]

x_funcs ([Scope: Func]) Int


Lists (to default output) all functors/classes defined in Scope (which belongs to user functor or class).
If Scope is omitted, global module/session scope is implied.
Returns total # of functors/classes in scope.
 

< without | x_trace >


x_trace

Trace mode control.

[ Debug ]

x_trace (Mode: Int, Expr: Any) Any


Debug: Evaluates Expr with trace mode Mode.
 

< x_funcs | x_vars >


x_vars

Show scope variables.

[ Debug ]

x_vars ([Scope: Func]) Int


Lists (to default output) all variables defined in Scope (which belongs to user functor or class).
If Scope is omitted, global module/session scope is implied.
Returns total # of variables in scope.
 

< x_trace | xor >


xor

Bitwise exclusion.

[ Scalar | Binary | Numeric ]

xor (I: Int, J: Int) Int


Bitwise exclusive OR of arguments: I ~ J.
 

< x_vars |