# Concurrent version of List.map in Ocaml

I would like to write a pseudo version of List.map with the help of the Event and Thread modules:

open Thread
open Event

let rec tmap f ls =
let c = new_channel () in match ls with
| [] -> []
| h::t -> let _ = create (fun c -> sync (send c (f h :: tmap f t))) c in


Calling the func:

# tmap (fun a -> a + a) [1;2;3;4;5;6];;
- : int list = [2; 4; 6; 8; 10; 12]


How can I make it smarter? In my case, I'm creating a thread for every list element, so if I had 10k elements this would be bad. My guess it that I should split the list, but how is it usually done?

Note that threads (from the Thread module) do not run in parallel (they are time-sharing)