|
Awkl
|
Enumerations | |
| enum | REPR { REPR_COMP = 0 , REPR_COMPK = 1 , REPR_PRET = 2 , REPR_PRETK = 3 , REPR_AWK = 4 } |
| Array representation format. More... | |
Functions | |
| any | idx (array A, string i) |
| Get element of array by index. | |
| unassigned | setIdx (array A, string i, any v) |
| Set element of array by index. | |
| auto | slice () |
| auto | declare (A) |
| Declare an empty array. | |
| auto | push (A, x) |
| Push element to an indexed array with starting index 1. | |
| unassigned | values (array A, array R) |
| Get array values into an indexed array. | |
| unassigned | keys (array A, array R) |
| Get array keys into an indexed array. | |
| unassigned | keyValues (array A, array R) |
| Get array keys and values into an indexed array. | |
| unassigned | flip (array A, array R) |
| Flip array keys with values. | |
| auto | swap (A, i, j) |
| Swap elements of an array. | |
| auto | swapKV (A, i, j) |
| Swap key-value subindexes in elements of an array. | |
| auto | uniq (A, R) |
| Unique elements from an array. | |
| auto | repr (A, fmt, s, name, i) |
| String representation of an array. | |
| auto | reprKV (A, s, name, i) |
| auto | echo (A, fmt, s, name, i) |
| auto | echoKV (A, s, name, i) |
| auto | inside (x, A) |
| auto | contains (A, x) |
| auto | count (A, x) |
| auto | countV (A, R) |
| auto | rev (A, R) |
| Elements of array in reversed order, into an indexed array. | |
| unassigned | foreach (string fn, array A) |
| For-each function. Call a function for each value (element) of an array. | |
| unassigned | foreachK (string fn, array A) |
| For-each-key function. Call a function for each key of an array. | |
| unassigned | foreachKV (string fn, array A) |
| For-each-key-value function. Call a function for each key-value pair of an array. | |
| auto | map (fn, A, R) |
| auto | mapI (fn, A, R) |
| Map always into an indexed array. | |
| auto | mapK (fn, A, R) |
| Map keys. | |
| auto | mapV (fn, A, R) |
| Map values. | |
| auto | mapKV (fn, A, R) |
| Map key-values. | |
| auto | mapMany () |
| auto | pairmap () |
| auto | filter (fn, A, R) |
| Filter. | |
| auto | filterI (fn, A, R) |
| Filter values into an indexed array. | |
| auto | filterKV (fn, A, R) |
| Filter. | |
| auto | grep (re, A, R) |
| auto | grepI (fn, A, R) |
| Grep into an indexed array. | |
| any | lfold (string fn, array A, any r0) |
| Fold left-to-right associativity. | |
| any | rfold (string fn, array A, any r0) |
| Fold right-to-left associativity. | |
| auto | foldings () |
| number | all (array A, string fn) |
| All function. | |
| bool | allBool (array A, string fn) |
| Boolean all function. | |
| number | any (array A, string fn) |
| Any function. | |
| bool | anyBool (array A, string fn) |
| Boolean any function. | |
| number | none (array A, string fn) |
| None function. | |
| auto | some () |
| auto | one () |
| auto | notall () |
| auto | first (array A, string fn, number key_f) -> any|unassigned |
| First element (its key or value) of an array that satisfies a function. | |
| unassigned | zipOp (string fn, array A, array B, array R) |
| Zip operator (or pairwise / element-wise operator) | |
| auto | allOp (fn, A, B) |
| auto | allEq (A, B) |
| auto | allNe (A, B) |
| auto | allLt (A, B) |
| auto | allLe (A, B) |
| auto | allGt (A, B) |
| auto | allGe (A, B) |
| auto | allRematch (A, B) |
| auto | allRenomatch (A, B) |
| auto | allApprox (A, B, rt, at) |
| auto | anyNe (A, B) |
| auto | anyRenomatch (A, B) |
| auto | sort (A, B, how) |
| auto | rsort (A, B) |
| auto | sortK (A, B, how) |
| auto | ltK (x, y) |
| auto | gtK (x, y) |
| auto | ltV (x, y) |
| auto | gtV (x, y) |
| auto | sortKV (A, R, how) |
| auto | rsortKV (A, R) |
| auto | quickSort (A, l, r, cmp, swap) |
| enum arr::REPR |
| number arr::all | ( | array | A, |
| string | fn ) |
All function.
| A | Array, either of boolean (1 or 0) elements if no function passed, or of element of any type if a function is passed |
| fn | Boolean function, that returns 1 or 0. Its parameter is the value. Optional |
| auto arr::allApprox | ( | A | , |
| B | , | ||
| rt | , | ||
| at | ) |
| bool arr::allBool | ( | array | A, |
| string | fn ) |
Boolean all function.
| A | Array, either of boolean (1 or 0 of type "number|bool") elements if no function passed, or of element of any type if a function is passed |
| fn | Boolean function, that returns "true" or "false" (1 or 0 of type "number|bool"). Its parameter is a value. Optional |
| auto arr::allEq | ( | A | , |
| B | ) |
| auto arr::allGe | ( | A | , |
| B | ) |
| auto arr::allGt | ( | A | , |
| B | ) |
| auto arr::allLe | ( | A | , |
| B | ) |
| auto arr::allLt | ( | A | , |
| B | ) |
| auto arr::allNe | ( | A | , |
| B | ) |
| auto arr::allOp | ( | fn | , |
| A | , | ||
| B | ) |
| auto arr::allRematch | ( | A | , |
| B | ) |
| auto arr::allRenomatch | ( | A | , |
| B | ) |
| number arr::any | ( | array | A, |
| string | fn ) |
Any function.
| A | Array, either of boolean (1 or 0) elements if no function passed, or of element of any type if a function is passed |
| fn | Boolean function, that returns 1 or 0. Its parameter is a value. Optional |
| bool arr::anyBool | ( | array | A, |
| string | fn ) |
Boolean any function.
| A | Array, either of boolean (1 or 0 of type "number|bool") elements if no function passed, or of element of any type if a function is passed |
| fn | Boolean function, that returns "true" or "false" (1 or 0 of type "number|bool"). Its parameter is a value. Optional |
| auto arr::anyNe | ( | A | , |
| B | ) |
| auto arr::anyRenomatch | ( | A | , |
| B | ) |
| auto arr::contains | ( | A | , |
| x | ) |
| auto arr::count | ( | A | , |
| x | ) |
| auto arr::countV | ( | A | , |
| R | ) |
| auto arr::declare | ( | A | ) |
Declare an empty array.
| auto arr::echo | ( | A | , |
| fmt | , | ||
| s | , | ||
| name | , | ||
| i | ) |
| auto arr::echoKV | ( | A | , |
| s | , | ||
| name | , | ||
| i | ) |
| auto arr::filter | ( | fn | , |
| A | , | ||
| R | ) |
Filter.
| auto arr::filterI | ( | fn | , |
| A | , | ||
| R | ) |
Filter values into an indexed array.
| auto arr::filterKV | ( | fn | , |
| A | , | ||
| R | ) |
Filter.
| auto arr::first | ( | array | A, |
| string | fn, | ||
| number | key_f ) -> any | unassigned |
First element (its key or value) of an array that satisfies a function.
| A | Array |
| fn | Boolean function, that returns 1 or 0. Its parameter is a value |
| key_f | 1 to return the key instead of the value |
| unassigned arr::flip | ( | array | A, |
| array | R ) |
Flip array keys with values.
| A | Original array |
| R | Array to be filled, with keys of original array as values, and values of original array as keys |
| auto arr::foldings | ( | ) |
| unassigned arr::foreach | ( | string | fn, |
| array | A ) |
For-each function. Call a function for each value (element) of an array.
| fn | Function name to be called for each value. Its parameter is a value |
| A | Array |
| unassigned arr::foreachK | ( | string | fn, |
| array | A ) |
For-each-key function. Call a function for each key of an array.
| fn | Function name to be called for each key. Its parameter is a key |
| A | Array |
| unassigned arr::foreachKV | ( | string | fn, |
| array | A ) |
For-each-key-value function. Call a function for each key-value pair of an array.
| fn | Function name to be called for each key-value pair. Its parameter is an array with the key in the "key" key and the value in the "value" key |
| A | Array |
| auto arr::grep | ( | re | , |
| A | , | ||
| R | ) |
| auto arr::grepI | ( | fn | , |
| A | , | ||
| R | ) |
Grep into an indexed array.
| auto arr::gtK | ( | x | , |
| y | ) |
| auto arr::gtV | ( | x | , |
| y | ) |
| any arr::idx | ( | array | A, |
| string | i ) |
Get element of array by index.
| A | Array to index |
| i | Index |
| auto arr::inside | ( | x | , |
| A | ) |
| unassigned arr::keys | ( | array | A, |
| array | R ) |
Get array keys into an indexed array.
| A | Original array |
| R | Array to be filled, indexily, with keys of the original array |
| unassigned arr::keyValues | ( | array | A, |
| array | R ) |
Get array keys and values into an indexed array.
| A | Original array |
| R | Array to be filled, indexily, with keys in the "key" subindex and values in the "value" subindex |
Fold left-to-right associativity.
| fn | Binary function |
| A | Array to fold |
| r0 | First element. Optional, if not passed, the first element of the array is used |
| auto arr::ltK | ( | x | , |
| y | ) |
| auto arr::ltV | ( | x | , |
| y | ) |
| auto arr::map | ( | fn | , |
| A | , | ||
| R | ) |
| auto arr::mapI | ( | fn | , |
| A | , | ||
| R | ) |
Map always into an indexed array.
| auto arr::mapK | ( | fn | , |
| A | , | ||
| R | ) |
Map keys.
| auto arr::mapKV | ( | fn | , |
| A | , | ||
| R | ) |
Map key-values.
| auto arr::mapMany | ( | ) |
| auto arr::mapV | ( | fn | , |
| A | , | ||
| R | ) |
Map values.
| number arr::none | ( | array | A, |
| string | fn ) |
None function.
| A | Array, either of boolean (1 or 0) elements if no function passed, or of element of any type if a function is passed |
| fn | Boolean function, that returns 1 or 0. Its parameter is a value. Optional |
| auto arr::notall | ( | ) |
| auto arr::one | ( | ) |
| auto arr::pairmap | ( | ) |
| auto arr::push | ( | A | , |
| x | ) |
Push element to an indexed array with starting index 1.
| auto arr::quickSort | ( | A | , |
| l | , | ||
| r | , | ||
| cmp | , | ||
| swap | ) |
| auto arr::repr | ( | A | , |
| fmt | , | ||
| s | , | ||
| name | , | ||
| i | ) |
String representation of an array.
| auto arr::reprKV | ( | A | , |
| s | , | ||
| name | , | ||
| i | ) |
/** String representation of an array with pretty-printed key-values
| auto arr::rev | ( | A | , |
| R | ) |
Elements of array in reversed order, into an indexed array.
Fold right-to-left associativity.
| fn | Binary function |
| A | Array to fold |
| r0 | First element. Optional, if not passed, the first element of the array is used |
| auto arr::rsort | ( | A | , |
| B | ) |
| auto arr::rsortKV | ( | A | , |
| R | ) |
| unassigned arr::setIdx | ( | array | A, |
| string | i, | ||
| any | v ) |
Set element of array by index.
| A | Array to index |
| i | Index |
| v | Value to set the element of array at certain index |
| auto arr::slice | ( | ) |
| auto arr::some | ( | ) |
| auto arr::sort | ( | A | , |
| B | , | ||
| how | ) |
| auto arr::sortK | ( | A | , |
| B | , | ||
| how | ) |
| auto arr::sortKV | ( | A | , |
| R | , | ||
| how | ) |
| auto arr::swap | ( | A | , |
| i | , | ||
| j | ) |
Swap elements of an array.
| auto arr::swapKV | ( | A | , |
| i | , | ||
| j | ) |
Swap key-value subindexes in elements of an array.
| auto arr::uniq | ( | A | , |
| R | ) |
Unique elements from an array.
| unassigned arr::values | ( | array | A, |
| array | R ) |
Get array values into an indexed array.
| A | Original array |
| R | Array to be filled, indexily, with values of the original array |
| unassigned arr::zipOp | ( | string | fn, |
| array | A, | ||
| array | B, | ||
| array | R ) |
Zip operator (or pairwise / element-wise operator)
| fn | Function name to be applied element-wise between 2 arrays, to their shortest zip |
| A | First array |
| B | Second array |
| R | Array to be filled with results |