Question: ocaml TODO: Write a dotProduct function for lists of integers, If the two list are of unequal lengths then return For example, dot Product (1;2;3;4]
TODO: Write a dotProduct function for lists of integers, If the two list are of unequal lengths then return For example, dot Product (1;2;3;4] [6;7;8;9] = 80 dot Product (1;2;3;4] [6] = 0 *) (since 1*6+2+7+3+8+49 = 80) I let rec dotProduct (x: int list) (y: int list): int = failwith "unimplemented
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
