]> gitweb.factorcode.org Git - factor.git/commitdiff
sequences-docs: add short help for the words longest and shortest
authorAlexander Iljin <ajsoft@yandex.ru>
Sun, 11 Jun 2017 20:14:40 +0000 (23:14 +0300)
committerAlexander Iljin <ajsoft@yandex.ru>
Wed, 21 Jun 2017 09:35:47 +0000 (12:35 +0300)
core/sequences/sequences-docs.factor

index 7c61aca9091a9a049aef6c68d8d7097997ff25ce..360217c2c54d76c078fadc760fd2d21c2e151e98 100644 (file)
@@ -1205,6 +1205,16 @@ HELP: supremum
 
 { min max supremum infimum } related-words
 
+HELP: shortest
+{ $values { "seq" sequence } { "elt" object } }
+{ $description "Outputs the shortest element of " { $snippet "seq" } "." } ;
+
+HELP: longest
+{ $values { "seq" sequence } { "elt" object } }
+{ $description "Outputs the longest element of " { $snippet "seq" } "." } ;
+
+{ shortest longest } related-words
+
 HELP: produce
 { $values { "pred" { $quotation ( ..a -- ..b ? ) } } { "quot" { $quotation ( ..b -- ..a obj ) } } { "seq" sequence } }
 { $description "Calls " { $snippet "pred" } " repeatedly. If the predicate yields " { $link f } ", stops, otherwise, calls " { $snippet "quot" } " to yield a value. Values are accumulated and returned in a sequence at the end." }