Question: Please write code in Haskell. Use the function listComp (picture below) to implement a function getEmpl, which takes a list of Employee records, each of
Please write code in Haskell.
Use the function listComp (picture below) to implement a function getEmpl, which takes a list of Employee records, each of which has the following fields: name which is a string, age which is an integer, and status which is of type Job and has a value of Managerial, Clerical, or Manual, as input, and returns the names of managerial employees over the age of 60.
you should use the following declarations in writing your function getEmpl:
data Job = Managerial | Clerical | Manual deriving Eq
data Employee = Employee{name::String, age::Integer, status::Job}
here is a listComp function, which takes three inputs : the first is a function, the second a list and the third a predicate, and constructs a list by filtering the input list with the predicate then applying the function to the elements in the resultant list.
main::10) main Edo print( listcomp (*3) [2,2,2,3,5,3,5,6,4,3,5,8) odd) listcomp :: (a->b)-> [a]->(a->Bool)->[b] listcomp fx g = [ft | t