Perhaps I’m missing something, but this is very similar (but not the same) to:
with \
{:ok, p1} <- Map.fetch(map, :param1),
{:ok, p2} <- Map.fetch(map, :param2),
...,
{:ok, pn} <- Map.fetch(map, :paramN)
do
...
end
The difference being that if the key exists and its value is nil then it will still pass unlike your example. Normally when I see use cases like “required” its a data validation case and changesets become a good tool of choice.






















