Due: Tues, Oct 17, 3:59pm
How to Submit
Submit a single file named
Your submission must compile without errors in GHCi. Put all non-working parts of your solution in comments.
Please preserve the existing
doctestcomments in the template (the lines starting with
>>>and the results underneath).
Read the Homework Policy! This describes what to do if you cannot solve a problem.
This assignment asks you to write three functions on a binary tree data type. Note that the data type is slightly different from the one used in HW1.
Download the above template, rename it, and define the
undefined functions. The template contains English descriptions of the undefined functions, along with
doctest comments that illustrate the intended behavior. Of course, feel free to add more examples to improve your test coverage.
The first two
undefined functions include type definitions to help get you started. For the third
undefined function, make sure to add the type definition before writing the function. You can figure out the type by looking at the