I'm trying to get the correct function which will update one or multiple value by iterating over a list of key.
Example:
s1 = Data.Map.fromList [(1,"value1"), (2,"value2"), (3,"value3")]
By passing to the function the list [1,2] and the update value "plus", the list should look like this:
[(1,"plus"), (2,"plus"), (3,"value3")]
Here is what I tried so far, I'm having a hard time implementing the function which iterate over the list of key to update
changeValue map newValue xs = foldr (\k map -> Map.adjust (newValue)(xs)(sm)) map m
What should I look for from there? I don't think I could use map in this situation.