Move enum docs
parent
45cf030cbd
commit
1ff2eaf09c
|
|
@ -16,6 +16,20 @@ $nl
|
|||
"To make an assoc into an alist:"
|
||||
{ $subsection >alist } ;
|
||||
|
||||
ARTICLE: "enums" "Enumerations"
|
||||
"An enumeration provides a view of a sequence as an assoc mapping integer indices to elements:"
|
||||
{ $subsection enum }
|
||||
{ $subsection <enum> } ;
|
||||
|
||||
HELP: enum
|
||||
{ $class-description "An associative structure which wraps a sequence and maps integers to the corresponding elements of the sequence."
|
||||
$nl
|
||||
"Enumerations are mutable; note that deleting a key calls " { $link delete-nth } ", which results in all subsequent elements being shifted down." } ;
|
||||
|
||||
HELP: <enum>
|
||||
{ $values { "seq" sequence } { "enum" enum } }
|
||||
{ $description "Creates a new enumeration." } ;
|
||||
|
||||
ARTICLE: "assocs-protocol" "Associative mapping protocol"
|
||||
"All associative mappings must be instances of a mixin class:"
|
||||
{ $subsection assoc }
|
||||
|
|
|
|||
|
|
@ -7,9 +7,6 @@ $nl
|
|||
"A mirror provides such a view of a tuple:"
|
||||
{ $subsection mirror }
|
||||
{ $subsection <mirror> }
|
||||
"An enum provides such a view of a sequence:"
|
||||
{ $subsection enum }
|
||||
{ $subsection <enum> }
|
||||
"Utility word used by developer tools which inspect objects:"
|
||||
{ $subsection make-mirror }
|
||||
{ $see-also "slots" } ;
|
||||
|
|
@ -44,11 +41,6 @@ HELP: >mirror<
|
|||
{ $values { "mirror" mirror } { "obj" object } { "slots" "a sequence of " { $link slot-spec } " instances" } }
|
||||
{ $description "Pushes the object being viewed in the mirror together with its slots." } ;
|
||||
|
||||
HELP: enum
|
||||
{ $class-description "An associative structure which wraps a sequence and maps integers to the corresponding elements of the sequence."
|
||||
$nl
|
||||
"Enumerations are mutable; note that deleting a key calls " { $link delete-nth } ", which results in all subsequent elements being shifted down." } ;
|
||||
|
||||
HELP: make-mirror
|
||||
{ $values { "obj" object } { "assoc" assoc } }
|
||||
{ $description "Creates an assoc which reflects the internal structure of the object." } ;
|
||||
|
|
|
|||
|
|
@ -152,6 +152,7 @@ ARTICLE: "collections" "Collections"
|
|||
"Implementations:"
|
||||
{ $subsection "hashtables" }
|
||||
{ $subsection "alists" }
|
||||
{ $subsection "enums" }
|
||||
{ $heading "Other collections" }
|
||||
{ $subsection "boxes" }
|
||||
{ $subsection "dlists" }
|
||||
|
|
|
|||
Loading…
Reference in New Issue