]> gitweb.factorcode.org Git - factor.git/blobdiff - core/sequences/sequences-docs.factor
sequences: extra doc and test for 2all?
[factor.git] / core / sequences / sequences-docs.factor
index b535883baf8199047492559d1d0edf38a92f972e..b6d219c5e9fa1791b8b74a6db9c0efe8690fbb98 100644 (file)
@@ -443,7 +443,13 @@ HELP: 3map-as
 
 HELP: 2all?
 { $values { "seq1" sequence } { "seq2" sequence } { "quot" { $quotation ( ... elt1 elt2 -- ... ? ) } } { "?" boolean } }
-{ $description "Tests the predicate pairwise against elements of " { $snippet "seq1" } " and " { $snippet "seq2" } "." } ;
+{ $description "Tests the predicate pairwise against elements of " { $snippet "seq1" } " and " { $snippet "seq2" } ". If the sequences have different lengths, then only the smallest sequences items are compared with the other." }
+{ $examples
+  { $example "USING: prettyprint sequences ;"
+    "{ 1 2 3 4 } { 2 4 6 8 } [ <= ] 2all? ."
+    "t"
+  }
+} ;
 
 HELP: find
 { $values { "seq" sequence }