]> gitweb.factorcode.org Git - factor.git/commitdiff
sequences-docs: add a bunch of related-words
authorAlexander Iljin <ajsoft@yandex.ru>
Thu, 16 Feb 2017 22:47:16 +0000 (01:47 +0300)
committerJohn Benediktsson <mrjbq7@gmail.com>
Fri, 17 Mar 2017 15:22:18 +0000 (08:22 -0700)
core/sequences/sequences-docs.factor

index c80d0b1a3c58dcff76509e364a4bf4f6c8252075..1ba61d0d0b5b2ae1c0ceee254d500c3db2242a91 100644 (file)
@@ -678,7 +678,7 @@ HELP: replace-slice
 { $description "Replaces a range of elements beginning at index " { $snippet "from" } " and ending before index " { $snippet "to" } " with a new sequence." }
 { $errors "Throws an error if " { $snippet "new" } " contains elements whose types are not permissible in " { $snippet "seq" } "." } ;
 
-{ push prefix suffix } related-words
+{ push push-either push-if pop pop* prefix suffix suffix! } related-words
 
 HELP: suffix
 { $values { "seq" sequence } { "elt" object } { "newseq" sequence } }
@@ -758,8 +758,6 @@ HELP: last
 { $description "Outputs the last element of a sequence." }
 { $errors "Throws an error if the sequence is empty." } ;
 
-{ pop pop* } related-words
-
 HELP: pop*
 { $values { "seq" "a resizable mutable sequence" } }
 { $description "Removes the last element and shortens the sequence." }
@@ -908,7 +906,7 @@ HELP: append-as
     }
 } ;
 
-{ append append-as } related-words
+{ append append-as append! 3append 3append-as push-all } related-words
 
 HELP: prepend
 { $values { "seq1" sequence } { "seq2" sequence } { "newseq" sequence } }
@@ -963,8 +961,6 @@ HELP: 3append-as
     }
 } ;
 
-{ 3append 3append-as } related-words
-
 HELP: surround
 { $values { "seq1" sequence } { "seq2" sequence } { "seq3" sequence } { "newseq" sequence } }
 { $description "Outputs a new sequence with " { $snippet "seq1" } " inserted between " { $snippet "seq2" } " and " { $snippet "seq3" } "." }
@@ -1109,6 +1105,12 @@ HELP: tail*
 }
 { $errors "Throws an error if the index is out of bounds." } ;
 
+{ tail tail* tail-slice tail-slice* } related-words
+{ head head* head-slice head-slice* } related-words
+{ cut cut* cut-slice } related-words
+{ unclip unclip-slice unclip-last unclip-last-slice } related-words
+{ first last but-last but-last-slice rest rest-slice } related-words
+
 HELP: shorter?
 { $values { "seq1" sequence } { "seq2" sequence } { "?" boolean } }
 { $description "Tests if the length of " { $snippet "seq1" } " is smaller than the length of " { $snippet "seq2" } "." } ;