]> gitweb.factorcode.org Git - factor.git/commitdiff
splitting.monotonic-docs: update documentation
authorAlexander Iljin <ajsoft@yandex.ru>
Wed, 18 Jan 2017 10:51:16 +0000 (13:51 +0300)
committerJohn Benediktsson <mrjbq7@gmail.com>
Fri, 20 Jan 2017 16:21:54 +0000 (08:21 -0800)
basis/splitting/monotonic/monotonic-docs.factor

index 61db411d31cbd48407f90b6fabf52d0742359a2a..60a32b785d643aa2fa5565871901c1976e366186 100644 (file)
@@ -25,15 +25,22 @@ HELP: monotonic-split
      { "seq" sequence } { "quot" quotation }
      { "pieces" "a sequence of sequences" }
 }
-{ $description "Monotonically splits a sequence." }
+{ $description "Splits a sequence into subsequences, in which for all consecutive pairs of elements the quotation returns true." }
 { $examples
     { $example
         "USING: splitting.monotonic math prettyprint ;"
         "{ 1 2 3 2 3 4 } [ < ] monotonic-split ."
         "{ { 1 2 3 } { 2 3 4 } }"
     }
+    { $example
+        "USING: splitting.monotonic math prettyprint ;"
+        "{ 1 2 3 2 1 0 } [ < ] monotonic-split ."
+        "{ { 1 2 3 } { 2 } { 1 } { 0 } }"
+    }
 } ;
 
+{ monotonic-split monotonic-split-slice } related-words
+
 HELP: downward-slices
 { $values
      { "seq" sequence }