From e88781b73e963e9fc9ec314b1ef5899af7d06596 Mon Sep 17 00:00:00 2001 From: Joe Groff Date: Thu, 18 Dec 2008 14:17:27 -0800 Subject: [PATCH] gold plating for sequences.n-based --- extra/sequences/n-based/authors.txt | 1 + extra/sequences/n-based/n-based-docs.factor | 66 +++++++++++++++++++++ extra/sequences/n-based/summary.txt | 1 + extra/sequences/n-based/tags.txt | 2 + 4 files changed, 70 insertions(+) create mode 100644 extra/sequences/n-based/authors.txt create mode 100644 extra/sequences/n-based/n-based-docs.factor create mode 100644 extra/sequences/n-based/summary.txt create mode 100644 extra/sequences/n-based/tags.txt diff --git a/extra/sequences/n-based/authors.txt b/extra/sequences/n-based/authors.txt new file mode 100644 index 0000000000..f13c9c1e77 --- /dev/null +++ b/extra/sequences/n-based/authors.txt @@ -0,0 +1 @@ +Joe Groff diff --git a/extra/sequences/n-based/n-based-docs.factor b/extra/sequences/n-based/n-based-docs.factor new file mode 100644 index 0000000000..ca5ac57cec --- /dev/null +++ b/extra/sequences/n-based/n-based-docs.factor @@ -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: +{ $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 ; + +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 ; + +10 months at . +"> "\"October\"" } } ; + +{ 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 } +; + +ABOUT: "sequences.n-based" diff --git a/extra/sequences/n-based/summary.txt b/extra/sequences/n-based/summary.txt new file mode 100644 index 0000000000..a8097a3131 --- /dev/null +++ b/extra/sequences/n-based/summary.txt @@ -0,0 +1 @@ +Sequence adaptor to treat a sequence as an n-based assoc diff --git a/extra/sequences/n-based/tags.txt b/extra/sequences/n-based/tags.txt new file mode 100644 index 0000000000..1ee19c1323 --- /dev/null +++ b/extra/sequences/n-based/tags.txt @@ -0,0 +1,2 @@ +sequences +assocs