]> gitweb.factorcode.org Git - factor.git/blob - basis/linked-assocs/linked-assocs-docs.factor
Writing docs for linked-assocs
[factor.git] / basis / linked-assocs / linked-assocs-docs.factor
1 IN: linked-assocs
2 USING: help.markup help.syntax assocs ;
3
4 HELP: linked-assoc
5 { $class-description "The class of linked assocs. Linked assoc are implemented by combining an assocs and 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-hash>
8 { $values { "assoc" "A new linked-assoc" } }
9 { $description "Creates a new, empty linked assoc." } ;
10
11 ARTICLE: "linked-assocs" "Linked assocs"
12 "A " { $emphasis "linked assoc" } " is an assoc which combines a hash table and a dlist to form a structure which has the insertion and retrieval characteristics of a hash table, but with the ability to get the items in insertion order."
13 $nl
14 "Linked assocs implement the following methods from the assoc protocol:"
15 { $subsection at* }
16 { $subsection assoc-size }
17 { $subsection >alist }
18 { $subsection set-at }
19 { $subsection delete-at }
20 { $subsection clear-assoc }
21 { $subsection >alist } ;
22
23 ABOUT: "linked-assocs"