Transposed assoc operations
Factor handbook » The language » Collections » Associative mapping operations

Prev:Lookup and querying of assocs
Next:Storing keys and values in assocs

Most assoc words take a key and find the corresponding value. The following words take a value and find the corresponding key:
value-at ( value assoc -- key/f )

value-at* ( value assoc -- key/f ? )

value? ( value assoc -- ? )

With most assoc implementations, these words runs in linear time, proportional to the number of entries in the assoc. For fast value lookups, use biassocs.