Skip to content

Instantly share code, notes, and snippets.

@BrooklinJazz
Created June 8, 2021 00:19
Show Gist options
  • Save BrooklinJazz/327976604524c7c89e414b8ce75c8607 to your computer and use it in GitHub Desktop.
Save BrooklinJazz/327976604524c7c89e414b8ce75c8607 to your computer and use it in GitHub Desktop.
Elixir example of when ordering gone wrong
defmodule Greeting do
def say_hello(name) do
"Hello #{name}"
end
def say_hello(name) when name === "Brooklin" do
"Oh it's just you again"
end
end
Greeting.say_hello("Brooklin") # Hello Brooklin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment