set-at ( value key assoc -- )
Factor handbook » The language » Collections » Associative mapping operations » Associative mapping protocol

Prev:>alist ( assoc -- newassoc )
Next:delete-at ( key assoc -- )


Vocabulary
assocs

Inputs
valuea value
keya key to add
assocan assoc


Outputs
None

Generic word contract
Stores the key/value pair into the assoc.

Side effects
Modifies assoc

Definition

GENERIC: set-at ( value key assoc -- )


Methods










M:: bitcask set-at ( value key bitcask -- )
bitcask path>> binary [
tell-output key value write-entry
key bitcask index>> set-at
] with-file-appender ;