List difference based on function
Returns the difference between two lists, after applying the provided function to each list element of both.
- Create a
set, usingmap()to applyfnto each element inb. - Use a list comprehension in combination with
fnonato only keep values not contained in the previously created set,_b.