]> gitweb.factorcode.org Git - factor.git/commitdiff
document ?set-at
authorDoug Coleman <doug.coleman@gmail.com>
Wed, 17 Sep 2008 04:14:25 +0000 (23:14 -0500)
committerDoug Coleman <doug.coleman@gmail.com>
Wed, 17 Sep 2008 04:14:25 +0000 (23:14 -0500)
core/hashtables/hashtables-docs.factor

index 07517afdf7f9b6514ee2cdf1fb9ef43c93efeab6..7cc8333c12656cac001fd5cdc949feb7dba3b77b 100755 (executable)
@@ -111,6 +111,12 @@ HELP: associate
 { $values { "value" "a value" } { "key" "a key" } { "hash" "a new " { $link hashtable } } }
 { $description "Create a new hashtable holding one key/value pair." } ;
 
+HELP: ?set-at
+{ $values
+     { "value" object } { "key" object } { "assoc/f" "an assoc or " { $link f } }
+     { "assoc" assoc } }
+{ $description "If the third input is an assoc, stores the key/value pair into that assoc, or else creates a new hashtable with the key/value pair as its only entry." } ;
+
 HELP: >hashtable
 { $values { "assoc" "an assoc" } { "hashtable" "a hashtable" } }
 { $description "Constructs a hashtable from any assoc." } ;