Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enum.member? vs el in list #26

Open
augnustin opened this issue Nov 5, 2020 · 1 comment
Open

Enum.member? vs el in list #26

augnustin opened this issue Nov 5, 2020 · 1 comment

Comments

@augnustin
Copy link

Hey, great repo here! Thanks! I learnt a lot!

I landed here after searching for a comparison between:

is_list_member = Enum.member?(list, el)
# vs
is_in_list = el in list

Any chance you would add this idiom to the repo?

Cheers

@michalmuskala
Copy link

They should be exactly the same, left in right expands to an Enum.member? call, if right is not a list or range literal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants