10
1
mirror of https://gitlab.com/scemama/QCaml.git synced 2024-06-02 03:15:19 +02:00
QCaml/Parallel_serial/Farm.ml

14 lines
272 B
OCaml

(* Single process function *)
let run_sequential f stream =
let next _ =
try
let task = Stream.next stream in
Some (f task)
with Stream.Failure -> None in
Stream.from next
let run ?(ordered=true) ?(comm) ~f stream =
run_sequential f stream