Question: those are easy questions about ocaml,please help. I will give you thumb up! Higher Order Functions In the following section, you have access to the

 those are easy questions about ocaml,please help. I will give you
those are easy questions about ocaml,please help. I will give you thumb up!

"Higher Order Functions In the following section, you have access to the fold_left standard library function with the following signature. fold_left : ('a -> 'b -> 'a) -> 'a -> 'b list -> 'a- You may not use pattern matching or calls to other library functions. If a function has been declared in a previous problem, you may call it in future problems even if you have not worked out its exact solution. 6. Implement the following standard list functions. When given the same input, they should have the same output as their standard library counterparts." 6.1. rev: a list -> 'a list 6.2. append : 'a list -> 'a list -> 'a liste 6.3. map : ('a -> 'b) -> 'a list -> 'b liste 6.4. filter : ('a -> bool) -> 'a list -> 'a liste 6.5. fold_right : ('a -> ' -> 'b) -> 'a list -> 'b -> 'be 7. Construct a function with the follow signature, combinations : 'a list -> 'b list -> (a * 'b) list list Such that when given two lists of lengths m and n respectively, ( al; a2; a3; .;am] : 'a liste (bl; b2; b3; -; bn ] : 'blist It computes a nested list of all combinations of their elements pair together. They should be ordered as shown below. it (al, b1); (al, b2); (al, b3); ...; (al, bn) }; [(a2, b1); (a2, b2); (a2, b3); ; (a2, bn) ); [(a3, bl); (a3, b2); (a3, b3); ; (a3, bn); 100 (am, b1); (am, b2); (am, b3); 29 ; (am, bn)

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!