9 lines
174 B
Text
9 lines
174 B
Text
module Main
|
|
|
|
import Data.Vect
|
|
|
|
dotProduct : (Num a) => Vect n a -> Vect n a -> a
|
|
dotProduct = (sum .) . zipWith (*)
|
|
|
|
main : IO ()
|
|
main = printLn $ dotProduct [1,2,3] [1,2,3]
|