Skip to content

Instantly share code, notes, and snippets.

@TylerPachal
Last active January 21, 2019 16:58
Show Gist options
  • Select an option

  • Save TylerPachal/f388d464f477c6794e791b53396aade2 to your computer and use it in GitHub Desktop.

Select an option

Save TylerPachal/f388d464f477c6794e791b53396aade2 to your computer and use it in GitHub Desktop.
with {:ok, width} <- Map.fetch(opts, :width),
{:ok, height} <- Map.fetch(opts, :height)
do
{:ok, width * height}
else
:error -> {:error, :wrong_data}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment