Skip to content

Instantly share code, notes, and snippets.

@carlows
Created September 28, 2021 12:48
Show Gist options
  • Save carlows/88f5e16ce70655dd7d3b6c11fbf93bda to your computer and use it in GitHub Desktop.
Save carlows/88f5e16ce70655dd7d3b6c11fbf93bda to your computer and use it in GitHub Desktop.
Snippet
defmodule A do
def a(x), do: "hello #{x}"
def a(nil), do: "found nil"
def a(%{a: "hello"} = t), do: "found #{Map.get(t, :a)}"
end
A.a(nil)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment