Handbook
Glossary
associate ( value key -- hash )
Factor handbook
»
The language
»
Collections
»
Hashtables
»
Hashtable utilities
Next:
?set-at ( value key assoc/f -- assoc )
Vocabulary
hashtables
Inputs
value
a value
key
a key
Outputs
hash
a new
hashtable
Word description
Create a new hashtable holding one key/value pair.
Definition
USING:
hashtables.private
kernel
;
IN:
hashtables
:
associate
( value key -- hash )
[
1 0
]
2dip
1
<hash-array>
[
2dup
hash@
set-nth-pair
]
keep
hashtable
boa
;
inline