at ( key assoc -- value/f ) (original) (raw)

Vocabulary
assocs

Inputs

key an object
assoc an assoc

Outputs

value/f the 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

USING: kernel ;

IN: assocs

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