I'm trying to make a filtering in a list by another list of Values Ex
I want to make this
selectedAreasList = ListOf(1,2,3)
initialItemProductList.filter { it.areaId in setOf(selectedAreasList) }
instead
initialItemProductList.filter { it.areaId in setOf(1,2,3) }
Because I don't know the number of items that my list will have
in; it would work within selectedAreasListdirectly. But most Set implementations are much more efficient at this (as they can look up the hash code directly instead of scanning through each time), so it's usually a good idea.