Question: in ocaml language Write a function ap: ('a -> 'b) list -> a list -> 'b list ap fs args applies each function in fs
in ocaml language

Write a function ap: ('a -> 'b) list -> a list -> 'b list ap fs args applies each function in fs to each argument in args in order. For example, ap [(fun x -> x^"?"); (fun x -> x^"!")] ["foo"; "bar" ] ["foo?"; "bar?"; "foo!"; "bar!"] where is an OCaml operator for string concatenation. = let ap fs args (* YOUR CODE HERE *)
Step by Step Solution
There are 3 Steps involved in it
To implement the ap function in OCaml you can use Listmap to iterate over the f... View full answer
Get step-by-step solutions from verified subject matter experts
