Question: please complete the following programming problem using Ocaml (* Define a recursive function, decToBin (n : int) : bool list, that returns the little-endian binary

please complete the following programming problem using Ocaml

(* Define a recursive function, decToBin (n : int) : bool list, that returns the little-endian binary encoding, as a list of boolean values, of the positive integer n. For example, decToBin 1 = [true] decToBin 2 = [false; true] decToBin 3 = [true; true] decToBin 23 = [true; true; true; false; true] *)

(* precondition: n > 0 *) let rec decToBin (n : int) : bool list = (* FILL IN HERE *) ;;

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!