! Copyright (C) 2008 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
-USING: help.markup help.syntax io.streams.string sequences
-math kernel quotations ;
+USING: help.markup help.syntax sequences math kernel quotations ;
IN: circular
HELP: <circular-string>
}
{ $description "Calls " { $snippet "quot" } " on each element of the sequence until each call yields " { $link f } " in succession." } ;
+HELP: circular-loop
+{ $values
+ { "circular" circular }
+ { "quot" quotation }
+}
+{ $description "Calls " { $snippet "quot" } " on each element of the sequence until one call yields " { $link f } "." }
+{ $notes "This rotates the " { $link circular } " object after each call, so the next element to be applied will always be the first element." } ;
+
ARTICLE: "circular" "Circular sequences"
"The " { $vocab-link "circular" } " vocabulary implements the " { $link "sequence-protocol" } " to allow an arbitrary start index and wrap-around indexing." $nl
"Creating a new circular object:"
growing-circular-push
}
"Iterating over a circular until a stop condition:"
-{ $subsections circular-while } ;
+{ $subsections circular-while circular-loop } ;
ABOUT: "circular"