
🔍
Additional general functions
| Name | Description / comments |
|---|---|
| assert_or[<cond>;<err or fn>] | Assert cond~1b, otherwise throw signal with err string or call fn[] |
| assert[<cond>;<err>] | Assert cond~1b, otherwise throw signal with message "--- Assert [err] Failed" |
| assert_eq[<expected>;<got>;<err>] | Assert lhs~rhs, otherwise throw signal with err message and differences |
| test[<name>;<expected>;<got>] | Function for generating tests |
| fc[<vec>;<size>] | Fill or cut |
| fmt[<string with %>; <list>] | Dynamic formatting |
| ltrim[<string>] | Trim leading spaces |
| rtrim[<string>] | Trim trailing spaces |
| trim[<string>] | Trim leading and trailing spaces |
| rcsv[<cols>;<sep>;<types>;<file>] | CSV file loading |
| wcsv[<tbl>;<cols>;<sep>;<file>] | CSV file write |
| peach[<fn>;<vec>] | Call fn for each from vec in parallel |
| xpeach[<fn>;<vec>] | Parallel each splits vec onto __cores__ - 1 pieces |
| con[&ldict1>;<dict2>] | Concatenates two dicts, duplicate keys concatenates their values |
| differ[<list] | Returns a boolean list indicating whеre consecutive pairs of items in x differ |
| lshift[<number>;<cnt>] | Left shift number by cnt bits |
| rshift[<number>;<cnt>] | Right shuft number by cnt bits |
| lrot[<number>;<cnt>] | Left rotate number by cnt bits |
| .o.cell[<globvar>] | Create cell to be used for synchronized access to a global variable from any task |
Examples:
TODO