Dot product function

Viewed 885

I write a dot product function that takes 2 lists:

let inline dot a b =
    List.zip a b
    |> List.map (fun (a, b) -> a * b)
    |> List.reduce (+)

Is there a better way to calculate dot product without using List.zip?

3 Answers
Related