Question: please write a function in ocaml! Ocaml! Remember not int list but 'a list which can be any type. Thanks! 11 b -> 7. Construct
11 b -> 7. Construct a function with the follow signature, combinations : a list -> 'b list -> (a + b) list liste Such that when given two lists of lengths m and n respectively, [ al; a 2; a3; [ bl; b2; b3; am ] : ; bn : Na liste 'b liste computes a nested list of all combinations of their elements pair together. They should be ordered as shown below. [ [ (al, bl); (al, b2); (al, b3); [ (a2, bi); (a2, b2); (a2, b3); [ (a3, b1); (a 3, b2); (a3, b3); ; (al, bn) ]; ; (a2, bn) ); - ; (a 3, bn) 1:4 SE [(am, b1); (am, b2); (am, b3); ; (am, bn) ) )
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
