[ System ]
_arguments () → List
Module arguments. Returns current module arguments (as list of strings, or undef). |
| _environ ►
[ System ]
_environ () → Hash
System environment. Returns system environment (as hash). |
◄ _arguments | _version ►
[ System ]
Interpreter version. Returns interpreter version (as Major, Minor, Patchlevel). |
[ Array | Constructor ]
Copy array. Makes and returns copy of array Array (both copies of array are sharing same elements). |
[ Array ]
Array dimensions. Returns list of dimensions of array Array (in order from outer to inner). |
a_elem (Array: Array, Index: List) → Mutable
Array element accessor. Returns mutable reference to element of array Array with index list Index (from outer indexes to inner). |
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 ►
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 element indexes, from outer to inner.) |
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_loop ►
a_loop (Array: Array, Var: Mutable, Body: Any) → Any
Array iterator. Evaluates body for all elements of Array (in internal order) (assigning current element to Var before each iteration). |
[ Array ]
Array rank. Returns rank (total number of dimensions) of array Array. |
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.) |
[ Array ]
Total elements in array. Returns total number of elements in array Array. |
Numeric absolute value. Arithmetic absolute value of numeric argument. (Equivalent to: (A >= 0 ? A : -A), but with A evaluated once). |
Trigonometric arccosine. ArcCosine of X (with result in radians). |
Numeric addition. Arithmetic sum of arguments: A + B. |
Bitwise conjunction. Bitwise AND of arguments: I & J. |
Numeric polar angle. Polar angle of point (X, Y), with result in radians. |
[ Func ]
apply (F: Func, Args: Any) → Any
Apply functor to argument(s). Invokes functor reference F with argument(s) Args, returning result of invocation. |
[ Array | Constructor ]
Array constructor. Creates new array (list Dims contains dimensions, from outer to inner). (Elements of created array are initialised to undef.) |
Trigonometric arcsine. ArcSine of X (with result in radians). |
Trigonometric arctangent. ArcTangent of X (with result in radians). |
[ 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). |
[ Conditional | Unary ]
Conditional "NOT" operation. If boolean condition Cond is false, returns true (1); otherwise returns false (0). Equivalent to: if (Cond, 0, 1). |
[ 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). |
Numeric rounding up. Arithmetic "ceiling" value: round X up to nearest integer. |
[ 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 a class instance.) |
Clear mutable. Resets value of mutable V (which must belong to numeric type) to 0. Returns 0. |
[ Scalar | Compare | Numeric ]
Numeric signed comparison. Arithmetic signed compare: equivalent to A < B ? -1 : A > B ? 1 : 0 (with A and B evaluated once). |
codepage ((Convert_8to16: Func, Convert_16to8: Func), @Body: Any) → Any
Defines codepage for string conversion. Sets codepage affecting s_retype (while evaluation of Body). (Convert_8to16 used to convert ASCII codes to Unicode; Convert_16to8 used to convert Unicode codes to ASCII.) |
comb (Operation: Term) → Scalar
Implements combined assignment. Evaluation of assignment combined with unary/binary term Operation. |
Numeric cosine. Cosine of X (with argument in radians). |
Numeric hyperbolic cosine. Hyperbolic Cosine of X. (Equals to: (exp(X) + exp(-X)) / 2). |
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. |
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_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_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_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. |
[ Block ]
Deconstruct block to item list. Deconstruct block B to list of expressions. (Reverse to enblock). |
Pre-decrement. Decrements value of mutable V (which must belong to numeric type) by 1. Returns: value of V after decrement. |
Post-decrement. Decrements value of mutable V (which must belong to numeric type) by 1. Returns value of V before decrement. |
[ 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). |
Expression devaluation. Inhibit evaluation of expression X (returning X proper). |
[ Object ]
devirt (Virt: Virtual, Class: Class) → Func
Explicit devirtualization. Returns proper version of virtual method Virt, defined for class Class. |
[ 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. |
div (X: Float, Y: Float) → Float
Numeric division. Arithmetic ratio of arguments: X / Y. |
[ 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). |
[ 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). |
Encode byte. Encode (from 8 bit signed/unsigned to string): convert integer Code to string of length 1. |
Encode long. Encode (from 32 bit signed/unsigned to string): convert integer Code to string of length 4. |
Encode word. Encode (from 16 bit signed/unsigned to string): convert integer Code to string of length 2. |
[ Block ]
Construct block from item list. Construct block from list of expressions L. (Reverse to deblock). |
[ 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). |
[ Scalar | Predicate | Numeric ]
Numeric equality. Arithmetic equality test: true, if A == B. |
R-evaluation. Internal: R-mode evaluation of mutable expression X. |
V-evaluation. Internal: V-mode evaluation of expression X. |
X-evaluation. Internal: X-mode evaluation of expression X. |
Numeric exponentiation. Exponent of X: e raised to power X. |
exp_by (X: Float, Y: Float) → Float
Numeric rise to power. Returns X raised to power Y. (Same as: exp (log(X) * Y) ). |
◄ exp | expect_array ►
expect_array (V: Any, @Body: Any) → Any
Expect array value. If argument V evaluates to array, evaluates and returns Body. (Reports type error otherwise.) |
◄ exp_by | expect_float ►
expect_float (V: Any, @Body: Any) → Any
Expect float value. If argument V evaluates to float scalar, evaluates and returns Body. (Reports type error otherwise.) |
◄ expect_array | expect_hash ►
expect_hash (V: Any, @Body: Any) → Any
Expect hash value. If argument V evaluates to hash, evaluates and returns Body. (Reports type error otherwise.) |
◄ expect_float | expect_int ►
expect_int (V: Any, @Body: Any) → Any
Expect integer value. If argument V evaluates to integer scalar, evaluates and returns Body. (Reports type error otherwise.) |
◄ expect_hash | expect_list ►
expect_list (V: Any, @Body: Any) → Any
Expect list value. If argument V evaluates to list, evaluates and returns Body. (Reports type error otherwise.) |
◄ expect_int | expect_object ►
expect_object (V: Any, @Body: Any) → Any
Expect object value. If argument V evaluates to any class instance, evaluates and returns Body. (Reports type error otherwise.) |
◄ expect_list | expect_pattern ►
expect_pattern (V: Any, @Body: Any) → Any
Expect pattern value. If argument V evaluates to pattern, evaluates and returns Body. (Reports type error otherwise.) |
◄ expect_object | expect_string ►
expect_string (V: Any, @Body: Any) → Any
Expect string value. If argument V evaluates to string, evaluates and returns Body. (Reports type error otherwise.) |
◄ expect_pattern | f_and ►
[ Func | Conditional | Composer ]
f_and (Pred1: Func, Pred2: Func) → Func
Functional "AND" predicates composition. For predicates Pred1 and Pred2, results in predicate, evaluating to conditional AND of Pred1 and Pred2. ( f_and (Pred1, Pred2) ! (Arg) == c_and (Pred1 ! Arg, Pred2 ! Arg) ). |
◄ expect_string | f_close ►
[ Stream ]
f_close (Stream: Stream) → ()
Close opened stream. Close previously opened Stream. |
f_compose (F_f: Func, F_g: Func) → Func
Functional composition. Returns functional composition of F_f and F_g. (Result of (f_compose (F_f, F_g)) ! (V) is equal to F_f ! (F_g ! (V)) for any V.) |
f_err () → Stream
Standard error output. Returns default error output stream. |
[ 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. |
[ Stream ]
Get character from stream. Returns code of next character read from input stream Stream (or undef on EOF). |
[ Func ]
Identity. Identity functor (for any argument V returns V as is). |
f_in () → Stream
Standard input. Returns default input stream. |
[ Func | Conditional | Composer ]
Functional "NOT" predicate composition. For predicates Pred, results in predicate, evaluating to conditional NOT of Pred. ( f_not (Pred) ! (Arg) == c_not (Pred1 ! Arg) ). |
[ Stream ]
f_open (FileName: String, AccessMode: Int) → Stream
Open file. Opens system file FileName with AccessMode (as for C "open" library func). Returns new stream or undef, if open failed. |
[ Func | Conditional | Composer ]
f_or (Pred1: Func, Pred2: Func) → Func
Functional "OR" predicates composition. For predicates Pred1 and Pred2, results in predicate, evaluating to conditional OR of Pred1 and Pred2. ( f_or (Pred1, Pred2) ! (Arg) == c_or (Pred1 ! Arg, Pred2 ! Arg) ). |
f_out () → Stream
Standard output. Returns default output stream. |
[ 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. |
[ Stream ]
f_putc (Stream: Stream, Code: Int) → Int
Put character to stream. Writes character to output stream Stream. |
[ Stream ]
f_read (Stream: Stream, Count: Int) → String
Read string from stream. Reads exactly Count characters from input stream Stream, returning string result. |
[ Stream ]
f_seek (Stream: Stream, Position: Int) → Int
Seek absolutely in stream. Seek in stream Stream to Position (from start, if >0, or end, if < 0). |
[ Stream ]
f_skip (Stream: Stream, Offset: Int) → Int
Seek relatively in stream. Seek in stream Stream by Offset (either positive or negative). |
[ Stream ]
Tell current position in stream. Returns current pointer position in stream Stream. |
[ Scalar | Nullary | Conditional ]
false () → Bool
Literal false value. Returns false value (0). |
[ Scalar | Coercion | Numeric ]
Coerce scalar to float. Explicit float coercion: from scalar V to float value (according to default coercion rules). |
Numeric rounding down. Arithmetic "floor" value: round X down to nearest integer. |
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). |
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). |
[ Scalar | Predicate | Numeric ]
Numeric "greater than or equal" compare. Arithmetic "greater than/equal" test: true, if A >= B. |
[ Scalar | Predicate | Numeric ]
Numeric "greater than" compare. Arithmetic "greater than" test: true, if A > B. |
[ Hash ]
Clear hash. Clears hash Hash, removing all elements from it. Returns number of elements, which were present in hash. |
[ Hash ]
Hash counter. Returns total number of key/value pairs in hash Hash. |
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.) |
[ Hash ]
Inspect hash internal allocation. Returns list of internal bucket capacities in hash Hash. |
List of hash keys. Return open list of all keys in Hash, in no predictable (but same, as in h_values) order. |
h_load (Hash: Hash, (Key1: Any, Value1: Any), (Key2: Any, Value2: Any), ... (KeyN: Any, ValueN: Any), ) → Hash
Load hash with list of elements. Loads N pairs of (Key, Value) into hash Hash. Returns Hash. |
[ 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_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. |
[ 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. |
[ 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.) |
List of hash elements. Return open list of all (Key, Value) pairs in Hash, in no predictable (but same, as in h_keys and h_values) order. |
List of hash values. Return open list of all values in Hash, in no predictable (but same, as in h_keys) order. |
[ Hash | Constructor ]
Hash constructor. Creates and returns new (empty) hash (with optional initial Capacity). |
[ ]
Hash code value. Calculate hash code of result of V. |
[ Predicate ]
Identity test. Check expressions V and W for identity: true (1), if both operands evaluate to same result; false (0) otherwise. |
Integer ratio. Integer division of arguments: I % J. (Same as int(I / J), always rounding result towards 0). |
[ 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. |
Pre-increment. Increments value of mutable V (which must belong to numeric type) by 1. Returns: value of V after increment. |
Post-increment. Increments value of mutable V (which must belong to numeric type) by 1. Returns: value of V before increment. |
[ System ]
include (Filename: String) → Int
Include module. Include source file Filename (evaluating all top-level expressions and module definitions). |
inf_neg () → Float
Negative infinity. Returns negative infinite value. |
inf_pos () → Float
Positive infinity. Returns positive infinite value. |
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]). |
[ Scalar | Coercion | Numeric ]
Coerce scalar to integer. Explicit integer coercion: from scalar V to integer value (according to default coercion rules). |
Integer remainder. Integer remainder of arguments: I %% J. (Same as I - J * (I % J)). |
Check for array value. Predicate: true, if argument V evaluates to array. |
[ Predicate ]
Check for block. Predicate: true, if argument V evaluates to block. |
Check for class reference. Predicate: true, if functor F is reference to any class. |
Check for float value. Predicate: true, if argument V evaluates to float scalar. |
[ Predicate ]
Check for functor. Predicate: true, if argument V evaluates to functor reference. |
Check for hash value. Predicate: true, if argument V evaluates to hash. |
Check for integer value. Predicate: true, if argument V evaluates to integer scalar. |
Check for list. Predicate: true, if argument V evaluates to list. |
[ Predicate ]
Check mutability. Return true, if V evaluates to mutable result. |
Check for numeric value. Predicate: true, if argument V evaluates to numeric (int or float) scalar. |
Check for object value. Predicate: true, if argument V evaluates to instance of any class. |
◄ is_num | is_pattern ►
Check for pattern value. Predicate: true, if argument V evaluates to pattern. |
Check for stream. Predicate: true, if V evaluates to stream. |
◄ is_pattern | is_string ►
Check for string value. Predicate: true, if argument V evaluates to string scalar. |
[ Predicate ]
Check for term. Predicate: true, if argument V evaluates to term. |
[ Predicate ]
Check for undefined value. Predicate: true, if argument V evaluates to undef. |
[ Predicate ]
Check for variable. Predicate: true, if argument V evaluates to variable. |
◄ is_undef | is_virtual ►
Check for virtual reference. Predicate: true, if functor F is reference to virtual of any class. |
[ 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_cmp ►
l_cmp (Compare: Func, L: List, M: List) → Int
Compare lists of ordered elements. Compares lists L and M, applying Compare to each pair of elements from L and M. Returns result of first non-zero comparison (or 0, if all elements compare to 0). |
[ List ]
List copying. Returns exact copy of list L (copying all list elements, including nested lists). |
◄ l_cmp | l_count_ex ►
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 ►
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 ►
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 ►
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 head accessor. Returns mutable reference to head (first item) of list L. (Equivalent to l_item (0, L)). |
◄ l_filter_in | l_head_by ►
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_item (I: Int, L: List) → Mutable
List element accessor. Returns mutable reference to item I (starting at 0) of L, evaluated as list. |
[ List ]
Length of list. Returns length of list L (total # of list items). (Returns 1 for atomic values and 0 for undef.) |
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_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_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_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_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. |
[ 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. |
[ 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. |
[ List ]
List reference. Return reference to L (evaluated as list). |
[ 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.) |
[ List ]
List reversion. Returns reversion, from last item to first, of L, evaluated as list. |
◄ l_rep | l_sort_index ►
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_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 tail accessor. Returns mutable reference to tail (all items except first) of list L. |
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_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_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_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_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). |
[ List ]
l_zip (L: List, M: List) → List
Zip lists. Returns list of combined list pairs of elements from both L and M. |
[ Scalar | Predicate | Numeric ]
Numeric "less than or equal" compare. Arithmetic "less than/equal" test: true, if A <= B. |
let (V: Mutable, X: Any) → Any
"Lazy" assignment. Assigns expression X (without evaluation) to mutable V. Returns: V. |
Numeric logarithm. Natural (base e) logarithm of X (NAN, if X <= 0). |
log_by (X: Float, Y: Float) → Float
Numeric logarithm by base. Logarithm of Y base X. (Same as: log(Y) / log(X) ). |
[ Scalar | Predicate | Numeric ]
Numeric "less than" compare. Arithmetic "less than" test: true, if A < B. |
Numeric maximum. Arithmetically greater of arguments: A ?> B. (Equals to: A > B ? A : B, but evaluates arguments once). |
max_int () → Int
Integer maximum. Returns highest integer value available. |
Numeric minimum. Arithmetically lesser of arguments: A ?< B. (Equals to: A < B ? A : B, but evaluates arguments once). |
min_int () → Int
Integer minimum. Returns lowest integer value available. |
Numeric multiplication. Arithmetic product of arguments: A * B. |
nan () → Float
Not a number. Returns numeric indefinite (not a number) value. |
[ Scalar | Predicate | Numeric ]
Numeric inequality. Arithmetic inequality test: true, if A <> B. |
Numeric negation. Arithmetic negation of numeric argument: -A. |
Bitwise complement. Bitwise complement of integer argument: ~I. |
[ Scalar | Coercion | Numeric ]
Coerce scalar to number. Explicit numeric coercion: from scalar V to integer or float value (according to default coercion rules). |
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. |
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 ►
Multiply by \Pi. Value of X multiplied by Pi. |
Numeric polar radius. Polar radius of cartesian point (X, Y). (Same as sqr(X*X + Y*Y)). |
Random numbers generator. Returns next random number, belonging to the range 0..N. If N is omitted, may return any integer value. |
Randomization. Sets random numbers generator Seed (affecting following values returned by rand). If Seed is omitted, chooses completely random seed for randomization. |
Integer ratio alternate. Integer division of arguments. (Same as idiv (I, J), but rounding negative result down). |
reduce (Operation: Term) → Scalar
Implements list reduction. Performs reduction on binary term Operation. |
Expression revaluation. Evaluate result of evaluation of expression X. |
Integer remainder alternate. Integer remainder of arguments. (Same as irem (I, J), but rounding negative result down). |
◄ reval | rx_after_ex ►
[ Constructor | Pattern ]
rx_after_ex (CPred: Func) → Pattern
Character predicate sequence end (exclusive). Construct pattern, matching end of sequence of characters, for which application of CPred results in false. |
◄ rrem | rx_after_in ►
[ Constructor | Pattern ]
rx_after_in (CPred: Func) → Pattern
Character predicate sequence end (inclusive). Construct pattern, matching end of sequence of characters, for which application of CPred results in true. |
◄ rx_after_ex | rx_alt ►
[ Constructor | Pattern ]
rx_alt (First: Pattern, Second: Pattern) → Pattern
Alternation of patterns. Construct pattern, matching either First or Second. |
◄ rx_after_in | rx_any ►
[ Constructor | Pattern ]
rx_any () → Pattern
Any character pattern. Construct pattern, matching single arbitrary character. |
[ Constructor | Pattern ]
rx_any_ex (CPred: Func) → Pattern
Character predicate check (exclusive). Construct pattern, matching any character, for which application of CPred results in false. |
[ Constructor | Pattern ]
rx_any_in (CPred: Func) → Pattern
Character predicate check (inclusive). Construct pattern, matching any character, for which application of CPred results in true. |
[ Constructor | Pattern ]
rx_at_end (Offset: Int) → Pattern
End position anchor. Construct pattern, matching at offset Offset relative to end. |
◄ rx_any_in | rx_at_start ►
[ Constructor | Pattern ]
rx_at_start (Offset: Int) → Pattern
Start position anchor. Construct pattern, matching at offset Offset relative to beginning. |
◄ rx_at_end | rx_before_ex ►
[ Constructor | Pattern ]
rx_before_ex (CPred: Func) → Pattern
Character predicate sequence start (exclusive). Construct pattern, matching start of sequence of characters, for which application of CPred results in false. |
◄ rx_at_start | rx_before_in ►
[ Constructor | Pattern ]
rx_before_in (CPred: Func) → Pattern
Character predicate sequence start (inclusive). Construct pattern, matching start of sequence of characters, for which application of CPred results in true. |
◄ rx_before_ex | rx_cat ►
[ Constructor | Pattern ]
rx_cat (Head: Pattern, Tail: Pattern) → Pattern
Concatenation of patterns. Construct pattern, matching concatenation of Head and Tail. |
◄ rx_before_in | rx_char ►
[ Constructor | Pattern ]
Literal character pattern. Construct pattern, matching literal character with code Code. |
[ Constructor | Pattern ]
rx_fail () → Pattern
Failure pattern. Construct pattern, always failing to match any context. |
◄ rx_char | rx_findfirst ►
rx_findfirst (Context: Pattern, Str: String) → Range
Search forward for pattern. Find first pattern Context in string Str. Returns offset range, where pattern is found (or undef, if no pattern found). |
◄ rx_fail | rx_findlast ►
rx_findlast (Context: Pattern, Str: String) → Range
Search backward for pattern. Find last pattern Context in string Str. Returns offset range, where pattern is found (or undef, if no pattern found). |
◄ rx_findfirst | 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_findlast | rx_match ►
rx_match (Context: Pattern, Str: String) → Int
Pattern matching. Match Str with pattern Context. Return length of pattern matched (or -1, if match failed). |
[ Constructor | Pattern ]
rx_rep (Range: Range, Max: Bool, Body: Pattern) → Pattern
Repetition of pattern. Construct pattern, matching Body, repeated minimum Range[0] and maximum Range[1] times. If Max is true, tries to find maximum number of repetitions; otherwise tries to find minimum. |
rx_split (Divider: Pattern, Str: String) → List
Split string by pattern. Split string Str (at places where pattern Divider is matched). |
[ Constructor | Pattern ]
rx_string (Text: String) → Pattern
Literal string pattern. Construct pattern, matching literal string Text. |
s_cat (S: String, T: String) → String
String concatenation. Returns strings S and T concatenated together. |
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_count_ex ►
[ String ]
s_count_ex (Str: String, Pred: Func) → Int
String count exclusive. Returns total # of all characters in Str, for which Pred evaluates to false. |
◄ s_cmp | s_count_in ►
[ String ]
s_count_in (Str: String, Pred: Func) → Int
String count inclusive. Returns total # of all characters in Str, for which Pred evaluates to true. |
◄ s_count_ex | s_empty ►
s_empty () → String
Empty string literal. Always returns empty string. |
◄ s_count_in | s_eq ►
[ Scalar | Predicate | String ]
s_eq (S: String, T: String) → Bool
String equality. String equality test: true, if S is identical to T. |
◄ s_empty | s_filter_ex ►
[ String ]
s_filter_ex (Str: String, Pred: Func) → String
String filter exclusive. Returns string, consisting from all characters in Str, for which Pred evaluates to false. |
◄ s_eq | s_filter_in ►
[ String ]
s_filter_in (Str: String, Pred: Func) → String
String filter inclusive. Returns string, consisting from all characters in Str, for which Pred evaluates to true. |
◄ s_filter_ex | s_findfirst ►
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_filter_in | s_findlast ►
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 | Predicate | 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 | Predicate | String ]
s_gt (S: String, T: String) → Bool
String "greater than" compare. String greater than test: true, if S is alphabetically after T. |
[ 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). |
[ Scalar | Predicate | 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. |
Get string length. Returns length of string S (0, if S is empty). |
[ Scalar | Predicate | String ]
s_lt (S: String, T: String) → Bool
String "less than" compare. String less than test: true, if S is alphabetically before T. |
s_map (Mapper: Func, S: String) → String
String character translation. 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_max (S: String, T: String) → String
String maximum. Returns either S or T, whichever comes last alphabetically. |
s_min (S: String, T: String) → String
String minimum. Returns either S or T, whichever comes first alphabetically. |
[ Scalar | Predicate | String ]
s_ne (S: String, T: String) → Bool
String inequality. String inequality test: true, if S is different from T. |
[ String ]
s_range (Type: Bool, Direction: Bool, FromChar: Int, ToChar: Int) → String
Create string from character range. Result contains charaters from FromChar up to ToChar-1 (unless Direction); or charaters from ToChar-1 down to FromChar (if Direction). Type defines type of result (0: ASCII; 1: Unicode). |
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_retype (Type: Bool, S: String)
Change string type. Convert string S to characters Type (0: to ASCII, 1: to Unicode). Conversion is defined by active codepage. |
String reverse. Returns reversion of string Str. |
◄ s_retype | s_rspan_ex ►
[ String ]
s_rspan_ex (Str: String, Pred: Func) → Int
String span backward (exclusive). Scans string backward from end, while evaluation of Pred returns false. Returns offset of last character, where Pred still evaluates to false. |
◄ s_rev | s_rspan_in ►
[ String ]
s_rspan_in (Str: String, Pred: Func) → Int
String span backward (inclusive). Scans string backward from end, while evaluation of Pred returns true. Returns offset of last character, where Pred still evaluates to true. |
◄ s_rspan_ex | s_slice ►
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_rspan_in | s_span_ex ►
[ String ]
s_span_ex (Str: String, Pred: Func) → Int
String span forward (exclusive). Scans string forward from start, while evaluation of Pred returns false. Returns offset of first character, where Pred evaluates to true. |
[ String ]
s_span_in (Str: String, Pred: Func) → Int
String span forward (inclusive). Scans string forward from start, while evaluation of Pred returns true. Returns offset of first character, where Pred evaluates to false. |
Query string type. Returns type of string S (0 for ASCII string; 1 for Unicode string). |
[ 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.) |
set (V: Mutable, X: Any) → Any
Eager assignment. Assigns result of evaluation of expression X to mutable V. Returns: assigned value. |
Numeric sign. Arithmetic sign (-1, 0, 1) of numeric argument. (Equivalent to: (A > 0 ? 1 : A < 0 ? -1 : 0), but with A evaluated once). |
Bitwise shift left. Arithmetic shift: returns I shifted left by J bits (I << J). Note: (I << -J == I >> J). |
Bitwise shift right. Arithmetic shift: returns I shifted right by J bits (I >> J). Note: (I >> -J == I << J). |
Numeric sine. Sine of X (with argument in radians). |
Numeric hyperbolic sine. Hyperbolic Sine of X. (Equals to: (exp(X) - exp(-X)) / 2). |
Numeric square root. Square root of X (NAN, if X < 0). |
[ Scalar | Coercion | String ]
Coerce scalar to string. Explicit string coercion: from scalar V to string value (according to default coercion rules). |
Numeric subtraction. Arithmetic difference of arguments: A - B. |
[ Object ]
super_of (Class: Class) → Class
Retrieve superclass of class. Returns class, from which Class is derived (or undef, if Class has no ancestors). |
swap (V: Mutable, W: Mutable) → ()
Exchange values. Exchanges values of mutables V and W. |
[ Conditional ]
switch (Value: Any, (Case1: Any, Action1: Any), (Case2: Any, Action2: Any), ... (CaseN: Any, ActionN: Any), ) → Any
Choose action by key. For Value specified, select first (Case, Action) pair, where result of Case is identical to Value. (Returns result of evaluation of Action.) |
Numeric tangent. Tangent of X (with argument in radians). |
Numeric hyperbolic tangent. Hyperbolic Tangent of X. (Equals to: sinh(X) / cosh(X), or (exp(X) - exp(-X)) / (exp(X) + exp(-X))). |
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). |
[ Scalar | Nullary | Conditional ]
true () → Bool
Literal true value. Returns true value (1). |
[ 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. |
[ 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). |
void (X: Any) → ()
Evaluate as void. Void evaluation of expression X (ignore returned value). |
[ 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). |
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 | with_input ►
with_input (Stream: Stream, @Body: Any) → Any
Default input stream wrapper. Evaluates Body, with input stream Stream defined as default input. |
◄ with | with_output ►
with_output (Stream: Stream, @Body: Any) → Any
Default output stream wrapper. Evaluates Body, with output stream Stream defined as default output. |
◄ with_input | without ►
without (Class: Class, @Body: Any) → Any
Class deinstantiation wrapper. Evaluates and returns Body, with tempoparily undefined current instance of class Class. |
◄ with_output | x_funcs ►
[ Debug ]
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. |
[ 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. |
[ Debug ]
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. |
Bitwise exclusion. Bitwise exclusive OR of arguments: I ~ J. |
◄ x_vars |