Two tasks given to me seem difficult to understand, and before completing the tasks to what I think the module leader wants, can anyone else wrap their head around these?
- Create a function called "hasMatch" that accepts a function and a list and returns true if the function returns true for at least one item in the list, and false otherwise. Does your function work polymorphically (e.g. on numbers and strings)?
- Write a function that will take a number as argument and return a new function that also takes a number: when the new function is called it returns the sum of its argument and the original number.
If you are able to give examples to better explain, that would be much appreciated.
EDIT: I obviously don't want absolute answers for me to take, just want an explanation to what the question means as I am struggling to understand what the leader wants.