Developer API∞
partial∞
Partially apply to a function the first argument and return specialization.
Parameters∞
func
function function to be specialized.first
string value to be fixed as first positional argument.
Returns function function with the first argument primed.
zip_pair∞
Create zipper for pairs that creates a pair object given two parameters.
Parameters∞
first
string key mapping to the first positional value.second
string key mapping to the second and last positional value.
Returns function that creates a pair object.
deep_equal∞
We invented a wheel again - hooray
Parameters∞
me
any maybe an object.you
any maybe an object.
Returns bool true if deeply equal.
is_object∞
We invented another wheel again - hip, hip, hooray
Parameters∞
thing
any maybe an object.
Returns bool true if given an object.
cook∞
Derive an array of objects from pairs that map population samples to distinct features.
The default (but optional) validation ensures:
- population and pairs both are non-empty arrays of non-null values
- features are unique (first elements of pairs)
- pairs second entries only provide members of population
Parameters∞
population
array array with all members of the population.sample
string key mapping to the sample from the population.feature
string key mapping to the feature variations.pairs
array pairs of features and array of samples (null for final pair).force
bool (false does / true does not) validate use. (optional, defaultfalse
)
Returns array of objects that map population samples to distinct features.