Last active
January 2, 2016 01:59
-
-
Save mtsmfm/8233718 to your computer and use it in GitHub Desktop.
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 :: String -> String | |
greet name | |
| name == "Juan" = niceGreeting ++ " " ++ name | |
| otherwise = badGreeting ++ " " ++ name | |
where niceGreeting = "Hello! So very nice to see you," | |
badGreeting = "Oh! Pfft. It's you." | |
greet' :: String -> String | |
greet' "Juan" = niceGreeting ++ " " ++ "Juan" | |
where niceGreeting = "Hello! So very nice to see you," | |
greet' name = badGreeting ++ " " ++ name | |
where badGreeting = "Oh! Pfft. It's you." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment