I'm not sure if this is the right place to post this, apologies if it isn't!
I'm currently learning Haskell and have come across a problem I can't get my head around.
I'll try to explain it as best as I can.
Essentially I have two lists of tuples which are as follows: [(String,Integer)] and [(Float,Integer)] - (each list has several tuples)
What I need to do is: For every integer that has a float in the second list check if it's integer matches the integer in the first list and if it does return the string, although this function needs to return a list of strings, i.e. [String] with all the results.
I have already defined a function which returns a list of Integers from the second list (for the comparison on the integers in the first list).
This should be solvable using "high-order functions" of which I've spent a considerably amount of time playing with map and filter but haven't found a solution!
Thanks
I'm currently learning Haskell and have come across a problem I can't get my head around.
I'll try to explain it as best as I can.
Essentially I have two lists of tuples which are as follows: [(String,Integer)] and [(Float,Integer)] - (each list has several tuples)
What I need to do is: For every integer that has a float in the second list check if it's integer matches the integer in the first list and if it does return the string, although this function needs to return a list of strings, i.e. [String] with all the results.
I have already defined a function which returns a list of Integers from the second list (for the comparison on the integers in the first list).
This should be solvable using "high-order functions" of which I've spent a considerably amount of time playing with map and filter but haven't found a solution!
Thanks