]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/concurrency/combinators/combinators-docs.factor
core, basis, extra: Remove DOS line endings from files.
[factor.git] / basis / concurrency / combinators / combinators-docs.factor
index 28d6d11bd58cf37f75606b38979dcebbaba6b244..8f76b525049d950b12bd5255b9958c8d391a975c 100644 (file)
@@ -1,55 +1,55 @@
-USING: help.markup help.syntax sequences ;\r
-IN: concurrency.combinators\r
-\r
-HELP: parallel-map\r
-{ $values { "seq" sequence } { "quot" { $quotation ( elt -- newelt ) } } { "newseq" sequence } }\r
-{ $description "Spawns a new thread for applying " { $snippet "quot" } " to every element of " { $snippet "seq" } ", collecting the results at the end." }\r
-{ $errors "Throws an error if one of the iterations throws an error." } ;\r
-\r
-HELP: 2parallel-map\r
-{ $values { "seq1" sequence } { "seq2" sequence } { "quot" { $quotation ( elt1 elt2 -- newelt ) } } { "newseq" sequence } }\r
-{ $description "Spawns a new thread for applying " { $snippet "quot" } " to pairwise elements of " { $snippet "seq1" } " and " { $snippet "seq2" } ", collecting the results at the end." }\r
-{ $errors "Throws an error if one of the iterations throws an error." } ;\r
-\r
-HELP: parallel-each\r
-{ $values { "seq" sequence } { "quot" { $quotation ( elt -- ) } } }\r
-{ $description "Spawns a new thread for applying " { $snippet "quot" } " to every element of " { $snippet "seq" } ", blocking until all quotations complete." }\r
-{ $errors "Throws an error if one of the iterations throws an error." } ;\r
-\r
-HELP: 2parallel-each\r
-{ $values { "seq1" sequence } { "seq2" sequence } { "quot" { $quotation ( elt1 elt2 -- ) } } }\r
-{ $description "Spawns a new thread for applying " { $snippet "quot" } " to pairwise elements of " { $snippet "seq1" } " and " { $snippet "seq2" } ", blocking until all quotations complete." }\r
-{ $errors "Throws an error if one of the iterations throws an error." } ;\r
-\r
-HELP: parallel-filter\r
-{ $values { "seq" sequence } { "quot" { $quotation ( elt -- ? ) } } { "newseq" sequence } }\r
-{ $description "Spawns a new thread for applying " { $snippet "quot" } " to every element of " { $snippet "seq" } ", collecting the elements for which the quotation yielded a true value." }\r
-{ $errors "Throws an error if one of the iterations throws an error." } ;\r
-\r
-ARTICLE: "concurrency.combinators" "Concurrent combinators"\r
-"The " { $vocab-link "concurrency.combinators" } " vocabulary provides concurrent variants of various combinators."\r
-$nl\r
-"Concurrent sequence combinators:"\r
-{ $subsections\r
-    parallel-each\r
-    2parallel-each\r
-    parallel-map\r
-    2parallel-map\r
-    parallel-filter\r
-}\r
-"Concurrent product sequence combinators:"\r
-{ $subsections\r
-    parallel-product-each\r
-    parallel-cartesian-each\r
-    parallel-product-map\r
-    parallel-cartesian-map\r
-}\r
-"Concurrent cleave combinators:"\r
-{ $subsections\r
-    parallel-cleave\r
-    parallel-spread\r
-    parallel-napply\r
-}\r
-"The " { $vocab-link "concurrency.semaphores" } " vocabulary can be used in conjunction with the above combinators to limit the maximum number of concurrent operations." ;\r
-\r
-ABOUT: "concurrency.combinators"\r
+USING: help.markup help.syntax sequences ;
+IN: concurrency.combinators
+
+HELP: parallel-map
+{ $values { "seq" sequence } { "quot" { $quotation ( elt -- newelt ) } } { "newseq" sequence } }
+{ $description "Spawns a new thread for applying " { $snippet "quot" } " to every element of " { $snippet "seq" } ", collecting the results at the end." }
+{ $errors "Throws an error if one of the iterations throws an error." } ;
+
+HELP: 2parallel-map
+{ $values { "seq1" sequence } { "seq2" sequence } { "quot" { $quotation ( elt1 elt2 -- newelt ) } } { "newseq" sequence } }
+{ $description "Spawns a new thread for applying " { $snippet "quot" } " to pairwise elements of " { $snippet "seq1" } " and " { $snippet "seq2" } ", collecting the results at the end." }
+{ $errors "Throws an error if one of the iterations throws an error." } ;
+
+HELP: parallel-each
+{ $values { "seq" sequence } { "quot" { $quotation ( elt -- ) } } }
+{ $description "Spawns a new thread for applying " { $snippet "quot" } " to every element of " { $snippet "seq" } ", blocking until all quotations complete." }
+{ $errors "Throws an error if one of the iterations throws an error." } ;
+
+HELP: 2parallel-each
+{ $values { "seq1" sequence } { "seq2" sequence } { "quot" { $quotation ( elt1 elt2 -- ) } } }
+{ $description "Spawns a new thread for applying " { $snippet "quot" } " to pairwise elements of " { $snippet "seq1" } " and " { $snippet "seq2" } ", blocking until all quotations complete." }
+{ $errors "Throws an error if one of the iterations throws an error." } ;
+
+HELP: parallel-filter
+{ $values { "seq" sequence } { "quot" { $quotation ( elt -- ? ) } } { "newseq" sequence } }
+{ $description "Spawns a new thread for applying " { $snippet "quot" } " to every element of " { $snippet "seq" } ", collecting the elements for which the quotation yielded a true value." }
+{ $errors "Throws an error if one of the iterations throws an error." } ;
+
+ARTICLE: "concurrency.combinators" "Concurrent combinators"
+"The " { $vocab-link "concurrency.combinators" } " vocabulary provides concurrent variants of various combinators."
+$nl
+"Concurrent sequence combinators:"
+{ $subsections
+    parallel-each
+    2parallel-each
+    parallel-map
+    2parallel-map
+    parallel-filter
+}
+"Concurrent product sequence combinators:"
+{ $subsections
+    parallel-product-each
+    parallel-cartesian-each
+    parallel-product-map
+    parallel-cartesian-map
+}
+"Concurrent cleave combinators:"
+{ $subsections
+    parallel-cleave
+    parallel-spread
+    parallel-napply
+}
+"The " { $vocab-link "concurrency.semaphores" } " vocabulary can be used in conjunction with the above combinators to limit the maximum number of concurrent operations." ;
+
+ABOUT: "concurrency.combinators"