write Ocaml programe to add all numbers in a list ? the solution : let rec sum list = match list with [ ] -> 0 | x:: tail -> x + (sum tail);; let a = [2;4;5;6;1;9;10 ];; sum a;; question is :-Write a Ocaml Program to multiply each element in a list by 2. a= [2;4;5;6;1;9;10 ] Solution let rec intmult : int list * int -> int list = function ([],_) -> [0] | ([x] ,al) -> [x * al] | (x::xs,al) -> x * al :: intmult (xs, al);; Also, you can use the map function as I mentioned below, let intmult (l,m)= List.map (fun x -> x * m) l.