Created
September 28, 2021 12:48
-
-
Save carlows/88f5e16ce70655dd7d3b6c11fbf93bda to your computer and use it in GitHub Desktop.
Snippet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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