If you want to use random access, you must use arrays. Random access to list items will work, but it is inefficient (it needs to iterate over the list from the very beginning). The version using arrays will look like this:
let conslist = [|f1; f2|];;
let pmap2 (arr1:_[]) (arr2:_[]) =
seq { for i in 0 .. 1 do
yield async { return arr1.[i] arr2.[i] } }
|> Async.Parallel |> Async.RunSynchronously
( ) Seq.zip. , , ( ):
let pmap2 functions arguments =
seq { for f, arg in Seq.zip functions arguments do
yield async { return f arg } }
|> Async.Parallel |> Async.RunSynchronously