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

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


Vocabulary
assocs

Inputs
assocan assoc
keyan object


Outputs
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 ?of.

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

Definition


: of ( assoc key -- value/f ) swap at ; inline