Transposed assoc operations - Factor Documentation (original) (raw)

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.