Awkl
Loading...
Searching...
No Matches
arr.awk File Reference

Namespaces

namespace  arr
 

Enumerations

enum  arr::REPR {
  arr::REPR_COMP = 0 , arr::REPR_COMPK = 1 , arr::REPR_PRET = 2 , arr::REPR_PRETK = 3 ,
  arr::REPR_AWK = 4
}
 Array representation format. More...
 

Functions

any arr::idx (array A, string i)
 Get element of array by index.
 
unassigned arr::setIdx (array A, string i, any v)
 Set element of array by index.
 
auto arr::slice ()
 
auto arr::declare (A)
 Declare an empty array.
 
auto arr::push (A, x)
 Push element to an indexed array with starting index 1.
 
unassigned arr::values (array A, array R)
 Get array values into an indexed array.
 
unassigned arr::keys (array A, array R)
 Get array keys into an indexed array.
 
unassigned arr::keyValues (array A, array R)
 Get array keys and values into an indexed array.
 
unassigned arr::flip (array A, array R)
 Flip array keys with values.
 
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.
 
auto arr::repr (A, fmt, s, name, i)
 String representation of an array.
 
auto arr::reprKV (A, s, name, i)
 

 
auto arr::echo (A, fmt, s, name, i)
 
auto arr::echoKV (A, s, name, i)
 
auto arr::inside (x, A)
 
auto arr::contains (A, x)
 
auto arr::count (A, x)
 
auto arr::countV (A, R)
 
auto arr::rev (A, R)
 Elements of array in reversed order, into an indexed array.
 
unassigned arr::foreach (string fn, array A)
 For-each function. Call a function for each value (element) of an array.
 
unassigned arr::foreachK (string fn, array A)
 For-each-key function. Call a function for each key of an array.
 
unassigned arr::foreachKV (string fn, array A)
 For-each-key-value function. Call a function for each key-value pair of an array.
 
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::mapV (fn, A, R)
 Map values.
 
auto arr::mapKV (fn, A, R)
 Map key-values.
 
auto arr::mapMany ()
 
auto arr::pairmap ()
 
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::grep (re, A, R)
 
auto arr::grepI (fn, A, R)
 Grep into an indexed array.
 
any arr::lfold (string fn, array A, any r0)
 Fold left-to-right associativity.
 
any arr::rfold (string fn, array A, any r0)
 Fold right-to-left associativity.
 
auto arr::foldings ()
 
number arr::all (array A, string fn)
 All function.
 
bool arr::allBool (array A, string fn)
 Boolean all function.
 
number arr::any (array A, string fn)
 Any function.
 
bool arr::anyBool (array A, string fn)
 Boolean any function.
 
number arr::none (array A, string fn)
 None function.
 
auto arr::some ()
 
auto arr::one ()
 
auto arr::notall ()
 
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.
 
unassigned arr::zipOp (string fn, array A, array B, array R)
 Zip operator (or pairwise / element-wise operator)
 
auto arr::allOp (fn, A, B)
 
auto arr::allEq (A, B)
 
auto arr::allNe (A, B)
 
auto arr::allLt (A, B)
 
auto arr::allLe (A, B)
 
auto arr::allGt (A, B)
 
auto arr::allGe (A, B)
 
auto arr::allRematch (A, B)
 
auto arr::allRenomatch (A, B)
 
auto arr::allApprox (A, B, rt, at)
 
auto arr::anyNe (A, B)
 
auto arr::anyRenomatch (A, B)
 
auto arr::sort (A, B, how)
 
auto arr::rsort (A, B)
 
auto arr::sortK (A, B, how)
 
auto arr::ltK (x, y)
 
auto arr::gtK (x, y)
 
auto arr::ltV (x, y)
 
auto arr::gtV (x, y)
 
auto arr::sortKV (A, R, how)
 
auto arr::rsortKV (A, R)
 
auto arr::quickSort (A, l, r, cmp, swap)