Question: Exercise: shape [] Write a function same_shape: 'a tree -> 'b tree -> bool that determines whether two trees have the same shape, regardless

Exercise: shape [] Write a function same_shape: 'a tree -> 'b tree

Exercise: shape [] Write a function same_shape: 'a tree -> 'b tree -> bool that determines whether two trees have the same shape, regardless of whether the values they carry at each node are the same. Hint: use a pattern match with three branches, where the expression being matched is a pair of trees. use ocaml only

Step by Step Solution

3.50 Rating (153 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

arrowforward Step 1 SUMMARY Hence we discussed all the points arrowforward Step 2 ANSWER include usi... View full answer

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 Accounting Questions!