[ Functors dictionary | Functors by category | Functors by metatype ]
Alphabetical AWL functors index
version: 0.5.5
(total: 204)

[ Array | Constructor ]

a_copy (Array: Array) Array

Copy array.

Makes and returns copy of array Array (both copies of array sharing same elements).
 

| a_dims >


[ Array ]

a_dims (Array: Array) List

Array dimensions.

Returns list of dimensions of array Array (inner dimensions first, outer dimensions last).
 

< a_copy | a_elem >


[ Array | Mutable ]

a_elem (Array: Array, Index: List) Mutable

Array element accessor.

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

< a_dims | a_fill >


[ Array | Mutator ]

a_fill (Array: Array, Elem: Any) Array

Fill array with value.

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

< a_elem | a_init_all >


[ Array | Mutator ]

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

Array functional initializer.

Initializes all elements of array Array by using functor reference FnVal.
(Each element is initialized by FnVal ! Index, where Index is list of elements indexes.)
 

< a_fill | a_load >


[ Array ]

a_load (Array: Array, Elems: List) Array

Load array elements from list of values.

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

< a_init_all | a_rank >


[ Array ]

a_rank (Array: Array) Int

Array rank.

Returns rank (total # of dimensions) of array Array.
 

< a_load | a_save >


[ Array ]

a_save (Array: Array) List

Save array elements to list of values.

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

< a_rank | a_total >


[ Array ]

a_total (Array: Array) Int

Total elements in array.

Returns total number of elements in array Array.
 

< a_save | abs >


[ Scalar | Unary | Numeric ]

abs (A: Num) Num

Numeric absolute value.

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

< a_total | acos >


[ Scalar | Unary | Numeric ]

acos (X: Float) Float

Trigonometric arccosine.

ArcCosine of X (with result in radians).
 

< abs | add >


[ Scalar | Binary | Numeric ]

add (A: Num, B: Num) Num

Numeric addition.

Arithmetic sum of arguments: A + B.
 

< acos | and >


[ Scalar | Binary | Numeric ]

and (I: Int, J: Int) Int

Bitwise conjunction.

Bitwise AND of arguments: I & J.
 

< add | ang >


[ Scalar | Binary | Numeric ]

ang (X: Num, Y: Num) Num

Numeric polar angle.

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

< and | apply >


[ Func ]

apply (F: Func, Args: Any) Any

Apply functor to argument(s).

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

< ang | array >


[ Array | Constructor ]

array (Dims: List) Array

Array constructor.

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

< apply | asin >


[ Scalar | Unary | Numeric ]

asin (X: Float) Float

Trigonometric arcsine.

ArcSine of X (with result in radians).
 

< array | atan >


[ Scalar | Unary | Numeric ]

atan (X: Float) Float

Trigonometric arctangent.

ArcTangent of X (with result in radians).
 

< asin | c_and >


[ 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 >


[ Conditional | Unary ]

c_not (Cond: Bool) Bool

Conditional "NOT" operation.

If boolean condition Cond is false, returns true (1); otherwise returns false (0).
Equivalent to: if (Cond, 0, 1).
 

< c_and | c_or >


[ 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 >


[ Scalar | Unary | Numeric ]

ceil (X: Float) Float

Numeric rounding up.

Arithmetic "ceiling" value: round X up to nearest integer.
 

< c_or | class_of >


[ Object ]

class_of (Object: Object) Class

Retrieve class of object.

Evaluates object Object, and returns class, to which Object belongs.
(Returns undef, if Object is not an object.)
 

< ceil | cmp >


[ Scalar | Compare | Numeric ]

cmp (A: Num, B: Num) Sign

Numeric signed comparison.

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

< class_of | comb >


[ Mutator | Binary | Meta ]

comb (Operation: Term) Scalar

Implements combined assignment.

Evaluation of assignment combined with unary/binary term Operation.
 

< cmp | cos >


[ Scalar | Unary | Numeric ]

cos (X: Float) Float

Numeric cosine.

Cosine of X (with argument in radians).
 

< comb | cosh >


[ Scalar | Unary | Numeric ]

cosh (X: Float) Float

Numeric hyperbolic cosine.

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

< cos | dc_b >


[ String | Unary | Decoder ]

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

Decode unsigned byte.

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

< cosh | dc_l >


[ String | Unary | Decoder ]

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

Decode long.

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

< dc_b | dc_sb >


[ String | Unary | Decoder ]

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

Decode signed byte.

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

< dc_l | dc_sw >


[ String | Unary | Decoder ]

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

Decode signed word.

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

< dc_sb | dc_w >


[ String | Unary | Decoder ]

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

Decode unsigned word.

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

< dc_sw | dec >


[ Mutator | Numeric | Unary ]

dec (V: Mutable) Num

Pre-decrement.

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

< dc_w | dec_p >


[ Mutator | Numeric | Unary ]

dec_p (V: Mutable) Num

Post-decrement.

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

< dec | determ >


[ Term ]

determ (T: Term) (Func, Any)

Deconstruct term to functor and argument(s).

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

< dec_p | deval >


[ Eval | Unary ]

deval (X: Any) Any

Expression devaluation.

Inhibit evaluation of expression X (returning X proper).
 

< determ | devirt >


[ Object ]

devirt (Virt: Virtual, Class: Class) Func

Explicit devirtualization.

Returns proper version of virtual method Virt, defined for class Class.
 

< deval | differ >


[ Predicate ]

differ (V: Any, W: Any) Bool

Difference test.

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

< devirt | div >


[ Scalar | Binary | Numeric ]

div (X: Float, Y: Float) Float

Numeric division.

Arithmetic ratio of arguments: X / Y.
 

< differ | do_until >


[ Iterator | Conditional | Binary ]

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

Iterator with negative postcondition.

Repeatedly pre-evaluates Body, while Cond remains false.
Returns final value of Body (which is always evaluated at least once).
 

< div | do_while >


[ Iterator | Conditional | Binary ]

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

Iterator with positive postcondition.

Repeatedly pre-evaluates Body, while Cond remains true.
Returns final value of Body (which is always evaluated at least once).
 

< do_until | ec_b >


[ String | Unary | Encoder ]

ec_b (Code: Int) String

Encode byte.

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

< do_while | ec_l >


[ String | Unary | Encoder ]

ec_l (Code: Int) String

Encode long.

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

< ec_b | ec_w >


[ String | Unary | Encoder ]

ec_w (Code: Int) String

Encode word.

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

< ec_l | enterm >


[ Term ]

enterm (F: Func, A: Any) Term

Construct term from functor and argument(s).

Construct term from functor reference F and argument(s) A.
(Reverse to determ).
 

< ec_w | eq >


[ Scalar | Compare | Numeric ]

eq (A: Num, B: Num) Bool

Numeric equality.

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

< enterm | eval_r >


[ Eval | Unary ]

eval_r (X: Mutable) Mutable

Internal: R-mode evaluation of mutable expression X.
 

< eq | eval_v >


[ Eval | Unary ]

eval_v (X: Any) Any

Internal: V-mode evaluation of expression X.
 

< eval_r | eval_x >


[ Eval | Unary ]

eval_x (X: Any) Any

Internal: X-mode evaluation of expression X.
 

< eval_v | exp >


[ Scalar | Unary | Numeric ]

exp (X: Float) Float

Numeric exponentiation.

Exponent of X: e raised to power X.
 

< eval_x | exp_by >


[ Scalar | Binary | Numeric ]

exp_by (X: Float, Y: Float) Float

Numeric rise to power.

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

< exp | f_err >


[ Stream | Nullary ]

f_err () Stream

Standard error output.

Returns default error output stream.
 

< exp_by | f_get >


[ Stream ]

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

Get line(s) from stream as strings.

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 and saved.
 

< f_err | f_in >


[ Stream | Nullary ]

f_in () Stream

Standard input.

Returns default input stream.
 

< f_get | f_out >


[ Stream | Nullary ]

f_out () Stream

Standard output.

Returns default output stream.
 

< f_in | f_put >


[ Stream ]

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

Put value(s) to stream as strings.

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 >


[ Scalar | Nullary | Conditional ]

false () Bool

Literal false value.

Returns false value (0).
 

< f_put | float >


[ Scalar | Coercion | Numeric ]

float (V: Scalar) Float

Coerce scalar to float.

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

< false | floor >


[ Scalar | Unary | Numeric ]

floor (X: Float) Float

Numeric rounding down.

Arithmetic "floor" value: round X down to nearest integer.
 

< float | for_dec >


[ Iterator | Ternary ]

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

Decremental range iterator.

Decrements value of mutable Index, starting from (excluding) end of range R down to (including) start of range R, evaluating Body for each value of Index.
Returns final value of Body (or undef, if Body never was evaluated).
 

< floor | for_inc >


[ Iterator | Ternary ]

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

Incremental range iterator.

Increments value of mutable Index, starting from (including) start of range R up to (excluding) end of range R, evaluating Body for each value of Index.
Returns final value of Body (or undef, if Body never was evaluated).
 

< for_dec | ge >


[ Scalar | Compare | Numeric ]

ge (A: Num, B: Num) Bool

Numeric "greater than or equal" compare.

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

< for_inc | gt >


[ Scalar | Compare | Numeric ]

gt (A: Num, B: Num) Bool

Numeric "greater than" compare.

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

< ge | h_clear >


[ Hash ]

h_clear (Hash: Hash) Int

Clear hash.

Clears hash Hash, removing all elements from it.
Returns number of elements, which were present in hash.
 

< gt | h_count >


[ Hash ]

h_count (Hash: Hash) Int

Hash counter.

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

< h_clear | h_elem >


[ Hash | Mutable ]

h_elem (Hash: Hash, Key: Any) Mutable

Hash value accessor.

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

< h_count | h_inspect >


[ Hash ]

h_inspect (Hash: Hash) List

Inspect hash internal allocation.

Returns list of internal bucket capacities in hash Hash.
 

< h_elem | h_keys >


[ Hash | List ]

h_keys (Hash: Hash) List

List of hash keys.

Return open list of all keys in Hash, in no predictable (but same, as in h_values) order.
 

< h_inspect | h_lookup >


[ Hash ]

h_lookup (Hash: Hash, Key: Any) Any

Hash value lookup.

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

< h_keys | h_loop >


[ Hash | Iterator ]

h_loop (Hash: Hash, Var: Mutable, @Body: Any) Any

Hash iterator.

Iterates through hash Hash.
For each element of hash, list of (key, value) is assigned to mutable Var, then Body is evaluated.
(Keys/values order is unpredictable.)
Returns result of final evaluation of Body.
 

< h_lookup | h_rehash >


[ Hash ]

h_rehash (Hash: Hash, Capacity: Int) Int

Change hash capacity.

Explicitly change capacity of hash Hash to Capacity (preserving current hash contents).
Returns: current number of hash entries.
 

< h_loop | h_remove >


[ Hash ]

h_remove (Hash: Hash, Key: Any) Any

Hash value remove.

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

< h_rehash | h_values >


[ Hash | List ]

h_values (Hash: Hash) List

List of hash values.

Return open list of all values in Hash, in no predictable (but same, as in h_keys) order.
 

< h_remove | hash >


[ Hash | Constructor ]

hash ([Capacity: Int]) Hash

Hash constructor.

Creates and returns new (empty) hash (with optional initial Capacity).
 

< h_values | hcode >


[ ]

hcode (V: Any) Int

Hash code value.

Calculate hash code of result of V.
 

< hash | ident >


[ Predicate ]

ident (V: Any, W: Any) Bool

Identity test.

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

< hcode | idiv >


[ Scalar | Binary | Numeric ]

idiv (I: Int, J: Int) Int

Integer ratio.

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

< ident | if >


[ Conditional | Ternary ]

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

Conditional positive test.

If boolean Cond is true, evaluates and returns Then; otherwise evaluates and returns Else.
 

< idiv | inc >


[ Mutator | Numeric | Unary ]

inc (V: Mutable) Num

Pre-increment.

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

< if | inc_p >


[ Mutator | Numeric | Unary ]

inc_p (V: Mutable) Num

Post-increment.

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

< inc | include >


[ System ]

include (Filename: String) Int

Include module.

Include source file Filename (evaluating all top-level expressions and module definitions).
 

< inc_p | inside >


[ Numeric | Predicate ]

inside (Value: Int, R: Range) Bool

Check for value inclusion in range.

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

< include | int >


[ Scalar | Coercion | Numeric ]

int (V: Scalar) Int

Coerce scalar to integer.

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

< inside | irem >


[ Scalar | Binary | Numeric ]

irem (I: Int, J: Int) Int

Integer remainder.

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

< int | is_array >


[ Predicate | Array ]

is_array (V: Any) Bool

Check for array value.

Predicate: true, if argument V evaluates to array.
 

< irem | is_block >


[ Predicate ]

is_block (V: Any) Bool

Check for block.

Predicate: true, if argument V evaluates to block.
 

< is_array | is_class >


[ Predicate | Object ]

is_class (F: Func) Bool

Check for class reference.

Predicate: true, if functor F is reference to any class.
 

< is_block | is_float >


[ Predicate | Numeric ]

is_float (V: Any) Bool

Check for float value.

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

< is_class | is_func >


[ Predicate ]

is_func (V: Any) Bool

Check for functor.

Predicate: true, if argument V evaluates to functor reference.
 

< is_float | is_hash >


[ Predicate | Hash ]

is_hash (V: Any) Bool

Check for hash value.

Predicate: true, if argument V evaluates to hash.
 

< is_func | is_int >


[ Predicate | Numeric ]

is_int (V: Any) Bool

Check for integer value.

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

< is_hash | is_list >


[ Predicate | List ]

is_list (V: Any) Bool

Check for list.

Predicate: true, if argument V evaluates to list.
 

< is_int | is_mut >


[ Predicate ]

is_mut (V: Any) Bool

Check mutability.

Return true, if V evaluates to mutable result.
 

< is_list | is_num >


[ Predicate | Numeric ]

is_num (V: Any) Bool

Check for numeric value.

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

< is_mut | is_object >


[ Predicate | Object ]

is_object (V: Any) Bool

Check for object value.

Predicate: true, if argument V evaluates to instance of any class.
 

< is_num | is_pattern >


[ Predicate | Pattern ]

is_pattern (V: Any) Bool

Check for pattern value.

Predicate: true, if argument V evaluates to pattern.
 

< is_object | is_stream >


[ Stream | Predicate ]

is_stream (V: Any) Bool

Check for stream.

Predicate: true, if V evaluates to stream.
 

< is_pattern | is_string >


[ Predicate | String ]

is_string (V: Any) Bool

Check for string value.

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

< is_stream | is_term >


[ Predicate ]

is_term (V: Any) Bool

Check for term.

Predicate: true, if argument V evaluates to term.
 

< is_string | is_undef >


[ Predicate ]

is_undef (V: Any) Bool

Check for undefined value.

Predicate: true, if argument V evaluates to undef.
 

< is_term | is_var >


[ Predicate ]

is_var (V: Any) Bool

Check for variable.

Predicate: true, if argument V evaluates to variable.
 

< is_undef | is_virtual >


[ Predicate | Object ]

is_virtual (F: Func) Bool

Check for virtual reference.

Predicate: true, if functor F is reference to virtual.
 

< is_var | l_cat >


[ List ]

l_cat (L: List, M: List) List

List concatenation.

Returns concatenation of L and M, evaluated as lists: L [+] M.
(Returns copy of L, if M is undef; returns M, if L is undef.)
(If M is open list, result is open too.)
 

< is_virtual | l_copy >


[ List ]

l_copy (L: List) List

List copying.

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

< l_cat | l_count_ex >


[ List | Func ]

l_count_ex (Predicate: Func, L: List) List

Count list items exclusively.

Returns total count of elements of List, for which application of Predicate evaluates to false.
 

< l_copy | l_count_in >


[ List | Func ]

l_count_in (Predicate: Func, L: List) List

Count list items inclusively.

Returns total count of elements of List, for which application of Predicate evaluates to true.
 

< l_count_ex | l_filter_ex >


[ List | Func ]

l_filter_ex (Predicate: Func, L: List) List

Filter list exclusively.

Creates and returns new list, containing all elements of List, for which application of Predicate evaluates to false.
 

< l_count_in | l_filter_in >


[ List | Func ]

l_filter_in (Predicate: Func, L: List) List

Filter list inclusively.

Creates and returns new list, containing all elements of List, for which application of Predicate evaluates to true.
 

< l_filter_ex | l_head >


[ List | Mutable ]

l_head (L: List) Mutable

List head accessor.

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

< l_filter_in | l_head_by >


[ List | Mutable ]

l_head_by (N: Int, L: List) Mutable

Head of list, with offset.

Equivalent of l_head(L) applied N times.
(Returns L, if N == 0; equivalent to l_head(L), if N == 1.)
 

< l_head | l_item >


[ List | Mutable ]

l_item (I: Int, L: List) Mutable

List element accessor.

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

< l_head_by | l_len >


[ List ]

l_len (L: List) Int

Length of list.

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

< l_item | l_loop >


[ List | Iterator ]

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

Direct order list iterator.

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 >


[ List | Iterator ]

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

Reverse order list iterator.

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 >


[ List | Func ]

l_map (F: Func, L: List) List

Functional list mapping.

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 >


[ List | Mutator ]

l_pop (L: Mutable, V: Mutable) List

Pop elements from list.

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

< l_map | l_push >


[ List | Mutator ]

l_push (L: Mutable, V: Any) List

Push elements to list.

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

< l_pop | l_range >


[ List ]

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

Convert range to incremental list.

Constructs and returns new list, containing all integers from range R, in ascending order from first to last.
If optional functor F is specified, it is applied to elements of resulting list.
 

< l_push | l_range_r >


[ List ]

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

Convert range to decremental list.

Constructs and returns new list, containing all integers from range R, in descending order from last to first.
If optional functor F is specified, it is applied to elements of resulting list.
 

< l_range | l_ref >


[ List ]

l_ref (L: List) List

List reference.

Return reference to L (evaluated as list).
 

< l_range_r | l_rep >


[ List ]

l_rep (N: Int, L: List) List

List replication.

Returns replication of L (evaluated as list) N times in succession: L [*] N.
(Returns undef, if N <= 0; returns L , if N == 1.)
(If L is open list, result is open too.)
 

< l_ref | l_rev >


[ List ]

l_rev (L: List) List

List reversion.

Returns reversion, from last item to first, of L, evaluated as list.
 

< l_rep | l_sort_index >


[ List | Func ]

l_sort_index (Comp: Func, R: Range) List

Build sorted index.

Sort range R, using comparator Comp to compare pairs of indexes, belonging to R.
Returns list of indexes, ordered according to Comp.
 

< l_rev | l_split >


[ List | Mutator ]

l_split (N: Int, L: Mutable) List

Split list at specified position.

Split list L in two parts at position N (modifying 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 >


[ List | Mutable ]

l_tail (L: List) Mutable

List tail accessor.

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

< l_split | l_tail_by >


[ List | Mutable ]

l_tail_by (N: Int, L: List) Mutable

Tail of list, with offset.

Equivalent of l_tail(L) applied N times.
(Returns L, if N == 0; equivalent to l_tail(L), if N == 1.)
 

< l_tail | l_until >


[ List | Func ]

l_until (Predicate: Func, L: List) Int

Search list forward, negatively testing predicate.

Scans list L (from first element to last), applying functor Predicate to each element, while result remains false.
Returns: index of first element, where Predicate ! L[index] becomes 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 >


[ List | Func ]

l_until_r (Predicate: Func, L: List) Int

Search list backward, negatively testing predicate.

Scans list L (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 >


[ List | Func ]

l_while (Predicate: Func, L: List) Int

Search list forward, positively testing predicate.

Scans list L (from first element to last), applying functor Predicate to each element, while result remains true.
Returns: index of first element, where Predicate ! L[index] becomes 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 >


[ List | Func ]

l_while_r (Predicate: Func, L: List) Int

Search list backward, positively testing predicate.

Scans list L (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 >


[ Scalar | Compare | Numeric ]

le (A: Num, B: Num) Bool

Numeric "less than or equal" compare.

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

< l_while_r | let >


[ Mutator | Binary ]

let (V: Mutable, X: Any) Any

"Lazy" assignment.

Assigns expression X (without evaluation) to mutable V.
Returns: V.
 

< le | log >


[ Scalar | Unary | Numeric ]

log (X: Float) Float

Numeric logarithm.

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

< let | log_by >


[ Scalar | Binary | Numeric ]

log_by (X: Float, Y: Float) Float

Numeric logarithm by base.

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

< log | lt >


[ Scalar | Compare | Numeric ]

lt (A: Num, B: Num) Bool

Numeric "less than" compare.

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

< log_by | max >


[ Scalar | Binary | Numeric ]

max (A: Num, B: Num) Num

Numeric maximum.

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

< lt | min >


[ Scalar | Binary | Numeric ]

min (A: Num, B: Num) Num

Numeric minimum.

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

< max | mul >


[ Scalar | Binary | Numeric ]

mul (A: Num, B: Num) Num

Numeric multiplication.

Arithmetic product of arguments: A * B.
 

< min | ne >


[ Scalar | Compare | Numeric ]

ne (A: Num, B: Num) Bool

Numeric inequality.

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

< mul | neg >


[ Scalar | Unary | Numeric ]

neg (A: Num) Num

Numeric negation.

Arithmetic negation of numeric argument: -A.
 

< ne | not >


[ Scalar | Unary | Numeric ]

not (I: Int) Int

Bitwise complement.

Bitwise complement of integer argument: ~I.
 

< neg | num >


[ Scalar | Coercion | Numeric ]

num (V: Scalar) Num

Coerce scalar to number.

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

< not | or >


[ Scalar | Binary | Numeric ]

or (I: Int, J: Int) Int

Bitwise disjunction.

Bitwise OR of arguments: I | J.
 

< num | originator >


[ Object ]

originator (Virtual: Virtual) Class

Originator of virtual method.

Returns originator class of virtual functor Virtual.
 

< or | outside >


[ Numeric | Predicate ]

outside (Value: Int, R: Range) Bool

Check for value exclusion from range.

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

< originator | pi >


[ Scalar | Unary | Numeric ]

pi (X: Float) Float

Multiply by \Pi.

Value of X multiplied by Pi.
 

< outside | rad >


[ Scalar | Binary | Numeric ]

rad (X: Num, Y: Num) Num

Numeric polar radius.

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

< pi | rand >


[ Unary | Numeric ]

rand ([N: Int]) Int

Random numbers generator.

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

< rad | randomize >


[ Unary | Numeric ]

randomize (Seed: Int) Int

Randomization.

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

< rand | reduce >


[ List | Meta ]

reduce (Operation: Term) Scalar

Implements list reduction.

Performs reduction on binary term Operation.
 

< randomize | reval >


[ Eval | Unary ]

reval (X: Any) Any

Expression revaluation.

Evaluate result of evaluation of expression X.
 

< reduce | rx_alt >


[ Constructor | Pattern ]

rx_alt (First: Pattern, Second: Pattern) Pattern

Patterns alternation.

Construct pattern, matching either First or Second.
 

< reval | rx_any >


[ Constructor | Pattern ]

rx_any () Pattern

Any character pattern.

Construct pattern, matching any character.
 

< rx_alt | rx_cat >


[ Constructor | Pattern ]

rx_cat (Head: Pattern, Tail: Pattern) Pattern

Patterns concatenation.

Construct pattern, matching Head immediately followed by Tail.
 

< rx_any | rx_char >


[ Constructor | Pattern ]

rx_char (Code: Int) Pattern

Literal character pattern.

Construct pattern, matching single character with code Code.
 

< rx_cat | rx_length >


[ Pattern ]

rx_length (Context: Pattern) Range

Calculate length range of pattern.

Returns range of context lengths, which pattern Context may match.
(If context length is unlimited, Range[1] is undefined.)
 

< rx_char | rx_match >


[ String | Pattern ]

rx_match (Context: Pattern, Str: String) Int

Pattern matching.

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

< rx_length | rx_rep >


[ Constructor | Pattern ]

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

Repetition of pattern.

Construct pattern, matching Body, repeated at least Range[0] and at most Range[1] times.
If Longest is true, tries to find longest sequence of repetitions.
 

< rx_match | rx_string >


[ Constructor | Pattern ]

rx_string (Text: String) Pattern

Literal string pattern.

Construct pattern, matching literal string Text.
 

< rx_rep | s_cat >


[ Scalar | Binary | String ]

s_cat (S: String, T: String) String

String concatenation.

Returns strings S and T concatenated together.
 

< rx_string | s_cmp >


[ Scalar | Compare | String ]

s_cmp (S: String, T: String) Sign

String signed comparison.

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 >


[ Scalar | Nullary | String ]

s_empty () String

Empty string literal.

Always returns empty string.
 

< s_cmp | s_eq >


[ Scalar | Compare | String ]

s_eq (S: String, T: String) Bool

String equality.

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

< s_empty | s_findfirst >


[ Scalar | Binary | String ]

s_findfirst (S: String, Ctx: String) Int

Search string forward for context.

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 >


[ Scalar | Binary | String ]

s_findlast (S: String, Ctx: String) Int

Search string backward for context.

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 >


[ Scalar | Compare | String ]

s_ge (S: String, T: String) Bool

String "greater than or equal" compare.

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

< s_findlast | s_gt >


[ Scalar | Compare | String ]

s_gt (S: String, T: String) Bool

String "greater than" compare.

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

< s_ge | s_join >


[ String ]

s_join (Separator: String, Items: List) String

Join string list to string.

Returns result of concatenation of all items of Items (with strings Separator inserted between items).
Returns empty string, if List is empty.
Warning: list Items is expected to contain only strings (no implicit coercions).
 

< s_gt | s_le >


[ Scalar | Compare | String ]

s_le (S: String, T: String) Bool

String "less than or equal" compare.

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

< s_join | s_len >


[ Scalar | Unary | String ]

s_len (S: String) Int

Get string length.

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

< s_le | s_lt >


[ Scalar | Compare | String ]

s_lt (S: String, T: String) Bool

String "less than" compare.

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

< s_len | s_map >


[ String | Unary ]

s_map (Mapper: Func, S: String) String

String mapper.

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

< s_lt | s_max >


[ Scalar | Binary | String ]

s_max (S: String, T: String) String

String maximum.

Returns either S or T, whichever comes last alphabetically.
 

< s_map | s_min >


[ Scalar | Binary | String ]

s_min (S: String, T: String) String

String minimum.

Returns either S or T, whichever comes first alphabetically.
 

< s_max | s_ne >


[ Scalar | Compare | String ]

s_ne (S: String, T: String) Bool

String inequality.

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

< s_min | s_rep >


[ Scalar | Binary | String ]

s_rep (S: String, N: Int) String

String replication.

Returns S replicated exactly N times.
(Returns S, if N == 1; or empty string, if N == 0.)
 

< s_ne | s_retype >


[ Scalar | Binary | String ]

s_retype (Type: Bool, S: String)

Change string type.

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

< s_rep | s_slice >


[ Scalar | Binary | String ]

s_slice (R: Range, S: String) String

String slice.

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 >


[ Scalar | Unary | String ]

s_type (S: String) Int

Query string type.

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

< s_slice | self >


[ Object ]

self (Class: Class) Object

Retrieve current class instance.

Evaluates Class, and returns its current instance.
(Returns undef, if Class is not class reference, or has no current instance.)
 

< s_type | set >


[ Mutator | Binary ]

set (V: Mutable, X: Any) Any

Eager assignment.

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

< self | sgn >


[ Scalar | Unary | Numeric ]

sgn (A: Num) Sign

Numeric sign.

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

< set | shl >


[ Scalar | Binary | Numeric ]

shl (I: Int, J: Int) Int

Bitwise shift left.

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

< sgn | shr >


[ Scalar | Binary | Numeric ]

shr (I: Int, J: Int) Int

Bitwise shift right.

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

< shl | sin >


[ Scalar | Unary | Numeric ]

sin (X: Float) Float

Numeric sine.

Sine of X (with argument in radians).
 

< shr | sinh >


[ Scalar | Unary | Numeric ]

sinh (X: Float) Float

Numeric hyperbolic sine.

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

< sin | sqr >


[ Scalar | Unary | Numeric ]

sqr (X: Float) Float

Numeric square root.

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

< sinh | string >


[ Scalar | Coercion | String ]

string (V: Scalar) String

Coerce scalar to string.

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

< sqr | sub >


[ Scalar | Binary | Numeric ]

sub (A: Num, B: Num) Num

Numeric subtraction.

Arithmetic difference of arguments: A - B.
 

< string | swap >


[ Mutator | Binary ]

swap (V: Mutable, W: Mutable) ()

Exchange values.

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

< sub | tan >


[ Scalar | Unary | Numeric ]

tan (X: Float) Float

Numeric tangent.

Tangent of X (with argument in radians).
 

< swap | tanh >


[ Scalar | Unary | Numeric ]

tanh (X: Float) Float

Numeric hyperbolic tangent.

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

< tan | times >


[ Iterator | Unary ]

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

Fixed count iterator.

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

< tanh | true >


[ Scalar | Nullary | Conditional ]

true () Bool

Literal true value.

Returns true value (1).
 

< times | unless >


[ Conditional | Ternary ]

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

Conditional negative test.

If boolean Cond is false, evaluates and returns Else; otherwise evaluates and returns Then.
 

< true | until >


[ Iterator | Conditional | Binary ]

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

Iterator with negative precondition.

While boolean Cond remains false, repeatedly evaluates Body.
Returns final value of Body (or undef, if Body never was evaluated).
 

< unless | void >


[ Eval | Unary ]

void (X: Any) ()

Evaluate as void.

Void evaluation of expression X (ignore returned value).
 

< until | while >


[ Iterator | Conditional | Binary ]

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

Iterator with positive precondition.

While boolean Cond remains true, repeatedly evaluates Body.
Returns final value of Body (or undef, if Body never was evaluated).
 

< void | with >


[ Object | Wrapper ]

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

Class current instance wrapper.

Evaluates and returns Body, with object Instance temporarily defined as current instance of own class (and its ancestors).
 

< while | without >


[ Object | Wrapper ]

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

Class deinstance wrapper.

Evaluates and returns Body, with tempoparily undefined current instance of class Class.
 

< with | x_funcs >


[ Debug ]

x_funcs ([Scope: Func]) Int

Show scope functors/classes.

Lists all functors/classes, defined in Scope (belonging to user functor or class; defaults to module global scope).
Returns total # of functors/classes in scope.
 

< without | x_trace >


[ Debug ]

x_trace (Mode: Int [, Expr: Any]) Any

Debug local/global trace mode.

If expression Expr is defined: evaluates it, and outputs expression and/or result in trace mode Mode.
If expr is omitted: sets module trace mode to Mode.
 

< x_funcs | x_vars >


[ Debug ]

x_vars ([Scope: Func]) Int

Show scope variables.

Lists all variables, defined in Scope (belonging to user functor or class; defaults to module global scope).
Returns total # of variables in scope.
 

< x_trace | xor >


[ Scalar | Binary | Numeric ]

xor (I: Int, J: Int) Int

Bitwise exclusion.

Bitwise exclusive OR of arguments: I ~ J.
 

< x_vars |



Hosted by uCoz