Last active
December 5, 2018 21:36
-
-
Save damonvjanis/b777c3102a596056c82710b9a6e89ee2 to your computer and use it in GitHub Desktop.
Uses lists to do a matching comparison on big datasets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for lead <- leads do | |
matching_contacts = Enum.filter(contacts, fn c -> c["email"] == lead["email"] end) | |
# Return a tuple with the lead and any contacts that match | |
{lead, matching_contacts} | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment