gold plating for sequences.n-based
parent
797905b2bb
commit
e88781b73e
|
|
@ -0,0 +1 @@
|
|||
Joe Groff
|
||||
|
|
@ -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"
|
||||
|
|
@ -0,0 +1 @@
|
|||
Sequence adaptor to treat a sequence as an n-based assoc
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
sequences
|
||||
assocs
|
||||
Loading…
Reference in New Issue