Created
February 4, 2012 15:41
-
-
Save jldupont/1738545 to your computer and use it in GitHub Desktop.
Erlang / greet
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
greet(male, Name) -> | |
io:format("Hello, Mr. ~s!", [Name]); | |
greet(female, Name) -> | |
io:format("Hello, Mrs. ~s!", [Name]); | |
greet(_, Name) -> | |
io:format("Hello, ~s!", [Name]). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment