]> gitweb.factorcode.org Git - factor.git/commitdiff
document a word in sequences
authorDoug Coleman <doug.coleman@gmail.com>
Fri, 24 Jul 2009 23:10:53 +0000 (18:10 -0500)
committerDoug Coleman <doug.coleman@gmail.com>
Fri, 24 Jul 2009 23:10:53 +0000 (18:10 -0500)
core/sequences/sequences-docs.factor

index 0a301b3e3855774ee7f56d42203d84bba6e0b1a0..2122b1ca0886912cd6d8cda56a52ddd5a3d3fd5d 100755 (executable)
@@ -1311,6 +1311,20 @@ HELP: iota
   }
 } ;
 
+HELP: assert-sequence=
+{ $values
+    { "a" sequence } { "b" sequence }
+}
+{ $description "Throws an error if all the elements of two sequences, taken pairwise, are not equal." }
+{ $notes "The sequences need not be of the same type." }
+{ $examples
+  { $example
+    "USING: prettyprint sequences ;"
+    "{ 1 2 3 } V{ 1 2 3 } assert-sequence="
+    ""
+  }
+} ;
+
 ARTICLE: "sequences-unsafe" "Unsafe sequence operations"
 "The " { $link nth-unsafe } " and " { $link set-nth-unsafe } " sequence protocol bypasses bounds checks for increased performance."
 $nl
@@ -1591,6 +1605,7 @@ ARTICLE: "sequences-comparing" "Comparing sequences"
 { $subsection sequence= }
 { $subsection mismatch }
 { $subsection drop-prefix }
+{ $subsection assert-sequence= }
 "The " { $link <=> } " generic word performs lexicographic comparison when applied to sequences." ;
 
 ARTICLE: "sequences-f" "The f object as a sequence"