Question: 3. Write a Haskell function incTree Int -> BTree Int -> BTree Int such that incTree n tree creates a new tree that looks like

 3. Write a Haskell function incTree Int -> BTree Int ->

3. Write a Haskell function incTree Int -> BTree Int -> BTree Int such that incTree n tree creates a new tree that looks like tree except that every node label is incremented by n. For example, incTree 90 (BNode 3 Empty (BNode 9 Empty Empty)) should return: BNode 93 Empty (BNode 99 Empty Empty) 3. Write a Haskell function incTree Int -> BTree Int -> BTree Int such that incTree n tree creates a new tree that looks like tree except that every node label is incremented by n. For example, incTree 90 (BNode 3 Empty (BNode 9 Empty Empty)) should return: BNode 93 Empty (BNode 99 Empty Empty)

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!