Question: Code in Haskell Please Write a function matches that uses list comprehension to pick out all instances of an integer n from a list. matches

Code in Haskell Please

Code in Haskell Please Write a function matches that uses list comprehension

Write a function matches that uses list comprehension to pick out all instances of an integer n from a list. matches : : Integer [Integer ] [Integer] Example usage: matches 1[1,3,8,1] should return [1,1] matches 1[6,7,9] should return [] Use the matches function in the above problem to write a function that uses list comprehension to return True if an element is a member of a list, False otherwise. (You may not use the elem function that is already defined in Haskell.)

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!