Question: a ) Complete the following function to return number of occurences of the first parameter in the second parameter list. occurs 1 [ 1 ,
a Complete the following function to return number of occurences of the first parameter in the second parameter list. occurs will return since has occurrences in the list. occurs will return and occurs will return
occurs
occurs a : et restoccurs a
in if then
else
b Complete the following function to return number of occurences of the first parameter in the nodes of the second parameter tree. The definition of tree is given below. In the sample tree the calls return the corressponding values:
occurst
occurst
occurst
occurst
data Tree a Node a Tree a Tree a I Empty deriving Show
occurst Empty
occurst a Node left, right
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
