In this problem you should implemet a series of functions using comprehension lists.
Implement a function
myMap :: (a -> b) -> [a] -> [b] that emulates
map using comprehension lists.
Implement a function
myFilter :: (a -> Bool) -> [a] -> [a] that
emulates filter using comprehension lists.
Implement a function
myZipWith :: (a -> b -> c) -> [a] -> [b] -> [c]
that emulates zipWith using comprehension lists and
zip.
Implement a function
thingify :: [Int] -> [Int] -> [(Int, Int)] that,
given two lists of integers, returns the list that pairs the elements if
the element of the second list divides the one in the first
list.
Implement a function factors :: Int -> [Int]
that, given a non-null natural number, generates the ordered list with
all its factors (non necessaryly primes).
Each function scores 20 points.
Input
myMap (*2) [1..5] myFilter odd [1..5] myZipWith (*) [1..4] [1..4] thingify [1..6] [1..3] factors 24
Output
[2,4,6,8,10] [1,3,5] [1,4,9,16] [(1,1),(2,1),(2,2),(3,1),(3,3),(4,1),(4,2),(5,1),(6,1),(6,2),(6,3)] [1,2,3,4,6,8,12,24]