Question: 2. (6 points) Given the following programs do they type and what is their most general type? (a) Given that my foldr::b-> (a->b->b)-> [a]-> b


![[a]-> b give the type of fin: f = myfoldr id g](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f3aa8a63768_93866f3aa8a0e64e.jpg)

2. (6 points) Given the following programs do they type and what is their most general type? (a) Given that my foldr::b-> (a->b->b)-> [a]-> b give the type of fin: f = myfoldr id g where g a h x = h (a:x) (b) Given that my map:: (a->b) ->[a] -> [b] give the type of f in: f mymap (mymap (mymap h)) (C) Given mymap as above what is the type of f in f = mymap mymap
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
