I was expecting a different behavior from Map.get/3 :
iex(1)> Map.get(%{passed: nil}, :passed, 1)
nil
Looks like if the key is present, even if nil, you don’t get the default. After reading the docs, I see that it is specified there. How would you return 1 in the example above? Any other solutions?