new-assoc ( capacity exemplar -- newassoc )
Factor handbook > The language > Collections > Associative mapping operations > Associative mapping protocol

Prev:value-at* ( value assoc -- key/f ? )
Next:assoc-like ( assoc exemplar -- newassoc )


Vocabulary
assocs

Inputs and outputs
capacitya non-negative integer
exemplaran assoc
newassocan assoc


Generic word contract
Creates a new assoc from an exemplar which can hold capacity entries before growing.

Definition

GENERIC: new-assoc ( capacity exemplar -- newassoc )


Methods