65 ) = !is_string(k) ? undef
66 : let(i =
first(search([k], m, 1, 0 )))
195 let ( entry = m[i], key =
first(entry) )
196 if ( 2 != len(entry) )
201 ", has incorrect count=[", len(entry),
"]"
209 let ( entry = m[i], key =
first(entry) )
210 if ( is_string(key) ==
false )
215 ", key=[", key,
"] is not a string."
223 let ( entry = m[i], key =
first(entry) )
224 if ( len(
first(search([key], m, 0, 0))) > 1 )
228 ", key=[", key,
"] not unique."
232 concat(ec1, ec2, ec3);
251 if (verbose)
log_info(
"begin map check");
253 if (verbose)
log_info (
"checking map format and keys.");
269 ", has incorrect count=[", len(entry),
"]"
281 ", key=[", key,
"] is not a string."
286 if ( len(
first(search([key], m, 0, 0))) > 1 )
292 ", key=[", key,
"] not unique."
330 maxl = max( [
for (i = keys) len(i)] ) + 1;
332 for (key = (sort ==
true) ?
sort_q(keys) : keys)
342 chr(
consts(maxl-len(key), 32)),
"'", key,
"' = ",
405 maxl = max( [
for (i = keys) len(i)] ) + 1;
407 for (key = (sort ==
true) ?
sort_q(keys) : keys)
module log_warn(m)
Output warning message to console.
module log_echo(m)
Output message to console.
module log_info(m)
Output information message to console.
empty_str
<string> A string with no characters (the empty string).
empty_lst
<list> A list with no values (the empty list).
function second(v)
Return the second element of an iterable value.
function first(v)
Return the first element of an iterable value.
function sort_q(v, i, r=false)
Sort the elements of an iterable value using quick sort.
function consts(l, v, u=false)
Create a list of constant or incrementing elements.
function strl_html(v, b, p, a, f, d=false)
Convert a list of values to a concatenated HTML-formatted string.
function select_e(v, i, f, l)
Select each element at an index position of a list of iterable values.
function map_get_value(m, k)
Get the map value associated with a key.
module map_write(m, ks, sort=false, number=false, fs="^", thn="idx", index_tags=empty_lst, key_tags=["b"], value_tags=empty_lst)
Write formatted map entries to the console.
function map_get_keys(m)
Get a list of all map keys.
module map_check(m, verbose=false)
Perform basic format checks on a map and output errors to console.
module map_dump(m, sort=false, number=true, p=3)
Dump each map entry to the console.
function map_get_index(m, k)
Return the index of a map key.
function map_get_values(m)
Get a list of all map values.
function map_get_firstof2_or(m1, m2, k, d)
Get the the first value associated with an existing key in one of two maps.
function map_merge(m1, m2)
Merge the unique key-value pairs of a second map with those of a first.
function map_exists(m, k)
Test if a key exists.
function map_get_size(m)
Get the number of map entries.
function map_errors(m)
Perform basic format checks on a map and return errors.
function is_defined(v)
Test if a value is defined.
function is_number(v)
Test if a value is a number.