Skip to content

Instantly share code, notes, and snippets.

@coderdan
Created November 25, 2019 00:38
Show Gist options
  • Save coderdan/7082f5f37e83781eeebdeba87d55627c to your computer and use it in GitHub Desktop.
Save coderdan/7082f5f37e83781eeebdeba87d55627c to your computer and use it in GitHub Desktop.
def print_name(%User{} = user) do
"#{user.firstname} #{user.lastname}"
end
def print_name(_) do
"Unknown"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment