at ( key assoc -- value/f )
Factor handbook > The language > Collections > Associative mapping operations > Lookup and querying of assocs

Prev:key? ( key assoc -- ? )
Next:?at ( key assoc -- value/key ? )


Vocabulary
assocs

Inputs and outputs
keyan object
assocan assoc
value/fthe value associated to the key, or f if the key is not present in the assoc


Word description
Looks up the value associated with a key. This word makes no distinction between a missing value and a value set to f; if the difference is important, use at*.

See also
at*, key?, ?at, of, ?of

Definition


: at ( key assoc -- value/f ) at* drop ; inline