Skip to main content

frequencies

Function frequencies 

Source
pub fn frequencies<'a>(
    xs: impl Iterator<Item = &'a Value>,
    span: Span,
) -> Result<Value, EvalError>
Expand description

A map from each element to how many times it occurs, keyed as tatara’s hash-map keys (an Int and a Float are two keys): the meaning of tatara’s frequencies, built in one native pass.

§Errors

An element that cannot be a map key, as hash-map refuses it.