]> gitweb.factorcode.org Git - factor.git/blob - basis/linked-assocs/linked-assocs-docs.factor
scryfall: better moxfield words
[factor.git] / basis / linked-assocs / linked-assocs-docs.factor
1 IN: linked-assocs
2 USING: assocs help.markup help.syntax linked-assocs.prettyprint ;
3
4 HELP: linked-assoc
5 { $class-description "The class of linked assocs. Linked assoc are implemented by combining an assoc with a dlist. The assoc is used for lookup and retrieval of single values, while the dlist is used for getting lists of keys/values, which will be in insertion order." } ;
6
7 HELP: <linked-assoc>
8 { $values { "exemplar" "an exemplar assoc" } { "assoc" linked-assoc } }
9 { $description "Creates an empty linked assoc backed by a new instance of the same type as the exemplar." } ;
10
11 HELP: >linked-hash
12 { $values { "assoc" assoc } { "assoc'" linked-hash } }
13 { $description "Creates a new " { $link linked-hash } " containing the same elements as 'assoc'. The keys are inserted in the same order as the input assoc, if it has an order." } ;
14
15 HELP: <linked-hash>
16 { $values { "assoc" linked-assoc } }
17 { $description "Creates an empty linked assoc backed by a hashtable." } ;
18
19 ARTICLE: "linked-assocs" "Linked assocs"
20 "A " { $emphasis "linked assoc" } " is an assoc which combines an underlying assoc with a dlist to form a structure which has the insertion and retrieval characteristics of the underlying assoc (typically a hashtable), but with the ability to get the entries in insertion order by calling " { $link >alist } "."
21 $nl
22 "Linked assocs are implemented in the " { $vocab-link "linked-assocs" } " vocabulary."
23 { $subsections
24     linked-assoc
25     <linked-hash>
26     <linked-assoc>
27 } ;
28
29 ABOUT: "linked-assocs"