Question: Note 1: All functions, unless otherwise specified, should be polymorphic (i.e., they should work with any data type). For example, if you are writing a

 Note 1: All functions, unless otherwise specified, should be polymorphic (i.e.,

Note 1: All functions, unless otherwise specified, should be polymorphic (i.e., they should work with any data type). For example, if you are writing a method that should work for lists, the type must be 'a list, and not int list. Note 2: You may not use any functions available in the OCaml library that already solves all or most of the question. For example, OCaml provides a List.rev function, but you may not use that in this section. You should also avoid the higher-order functions List.map, List.fold_left, and List.filter. You can, however, use helper functions that you have defined and written yourself. For example, you can define your own higher-order function called "map", and then use that to solve, say, problem 7. 1. Write a recursive function pow, which takes two integer parameters x and n, and returns xn. Also write a function float_pow, which does the same thing, but for x being a float. You can assume that n is non-negative integer for both functions

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!