Discussion: Incorporating Erlang/OTP 21 map guards in Elixir

Another use case for is_map_key

defp request(integration = %{cache: cache}, path, opts) when :erlang.is_map_key({path, opts}, cache) do

But it would be better if we can use this in the future (compiling to guard calls perhaps?)

defp request(integration = %{cache: %{{path, opts} => cache}}, path, opts) do
2 Likes