test_eq(pad("hello", 37), 'hello ')core
Core utilities common to all other modules
pad
pad (s:str, pad_to:int)
Pad s with spaces to the right
attrkey
attrkey (attr)
Create a function that fetches attr of its input
str_enumerate
str_enumerate (lst:list, start:int=0)
Create aligned sequence of numbered strings for strings in lst
| Type | Default | Details | |
|---|---|---|---|
| lst | list | ||
| start | int | 0 | enumerate from what number |
| Returns | Iterable |
cz
cz (*funcs)
Compose functions together
Examples:
Function to compute number of digits in a decimal representation of a number:
cz(str, len)(32)2