gold plating for sequences.n-based

db4
Joe Groff 2008-12-18 14:17:27 -08:00
parent 797905b2bb
commit e88781b73e
4 changed files with 70 additions and 0 deletions

View File

@ -0,0 +1 @@
Joe Groff

View File

@ -0,0 +1,66 @@
! (c)2008 Joe Groff, see BSD license etc.
USING: help.markup help.syntax kernel math multiline sequences ;
IN: sequences.n-based
HELP: <n-based-assoc>
{ $values { "seq" sequence } { "base" integer } { "n-based-assoc" n-based-assoc } }
{ $description "Wraps " { $snippet "seq" } " in an " { $link n-based-assoc } " wrapper." }
{ $examples
{ $example <"
USING: assocs prettyprint kernel sequences.n-based ;
IN: scratchpad
: months
{
"January"
"February"
"March"
"April"
"May"
"June"
"July"
"August"
"September"
"October"
"November"
"December"
} 1 <n-based-assoc> ;
10 months at .
"> "\"October\"" } } ;
HELP: n-based-assoc
{ $class-description "An adaptor class that allows a sequence to be treated as an assoc with non-zero-based keys." }
{ $examples
{ $example <"
USING: assocs prettyprint kernel sequences.n-based ;
IN: scratchpad
: months
{
"January"
"February"
"March"
"April"
"May"
"June"
"July"
"August"
"September"
"October"
"November"
"December"
} 1 <n-based-assoc> ;
10 months at .
"> "\"October\"" } } ;
{ n-based-assoc <n-based-assoc> } related-words
ARTICLE: "sequences.n-based" "sequences.n-based"
"The " { $vocab-link "sequences.n-based" } " vocabulary provides a sequence adaptor that allows a sequence to be treated as an assoc with non-zero-based keys."
{ $subsection n-based-assoc }
{ $subsection <n-based-assoc> }
;
ABOUT: "sequences.n-based"

View File

@ -0,0 +1 @@
Sequence adaptor to treat a sequence as an n-based assoc

View File

@ -0,0 +1,2 @@
sequences
assocs