You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These koans use Enum.member? and MapSet.member?. I only know a little Elixir, but as far as I can tell these offer no benefit over in/2 (they're the same speed and give the same results).
Similarly, MapSet.equal?/2 is used instead of ==/2, but it doesn't need to be.
Would you accept a PR that changed lines like
assertMapSet.member?(@set,1)==___
into
assert(1in@set)==___
?
Thanks for writing/maintaining these koans!
The text was updated successfully, but these errors were encountered:
cmcaine
changed the title
member? or in?
Should the koans prefer in/2 over member?/2?
Oct 24, 2021
According to the docs the in/2 "operator" is simply a macro that translates to Enum.member?/2. I would say that the koans should teach this if possible, so rather than simply replacing them, we should introduce both 🙂
These koans use
Enum.member?
andMapSet.member?
. I only know a little Elixir, but as far as I can tell these offer no benefit overin/2
(they're the same speed and give the same results).Similarly,
MapSet.equal?/2
is used instead of==/2
, but it doesn't need to be.Would you accept a PR that changed lines like
into
?
Thanks for writing/maintaining these koans!
The text was updated successfully, but these errors were encountered: