Created
June 8, 2021 00:19
-
-
Save BrooklinJazz/327976604524c7c89e414b8ce75c8607 to your computer and use it in GitHub Desktop.
Elixir example of when ordering gone wrong
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 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