Page 1 of 1

Exercise: shape [★★★] Write a function same_shape : 'a tree -> 'b tree -> bool that determines whether two trees have th

Posted: Sat Feb 19, 2022 3:21 pm
by answerhappygod
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