Elixir v1.18.0-rc.0 released

is compare?/2 a macro?

Yep! Its purpose is so that you can write:

compare?(a < b, Date)

And it gets translated to the correct:

Date.compare(a, b) == :lt

You can read more here: CompareChain - Semantic, chained comparisons for Elixir

but as José said you want the operator out of the call, like this: Process.get(:not_a_key, a) < b.

Thanks, I was skimming and missed this point. But it didn’t work either :frowning:

3 Likes