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

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!