Question: Consider the following two OCaml functions, note that mod is the modulo function. let mysteryl 1 - List.fold left (fun acc x -> if (x

Consider the following two OCaml functions, note that mod is the modulo function. let mysteryl 1 - List.fold left (fun acc x -> if (x mod 21-0 then X::acc else acc) ti let rec mystery2 i acc match 1 with 1 x:xs -> if (x mod 21 - 0 then mystery2 x (x::acc) else mystery2 xs acc I 0 -> acc What is the type of mysteryi? O A int list -> int list O Bint list -> ('a * ' -> 'b) -> 'b -> 'a list -> 'b -> int list OC ('a * ' -> 'b) -> 'b -> 'a list -> 'b OD'a list -> 'a list OC. 'a list -> ('a * ' -> 'b) -> ' -> 'a list -> 'b -> 'a list
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
