-
-
Save denisshevchenko/eaaba578f86801e4ad7eb0f22441b68c to your computer and use it in GitHub Desktop.
This file contains hidden or 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
checkLocalhost :: String -> String | |
checkLocalhost ip | |
| ip == "127.0.0.1" = "It's a localhost!" | |
| ip == "0.0.0.0" = "It's a localhost!" | |
| ip == "::1/128 (0:0:0:0:0:0:0:1)" = "It's a localhost!" | |
| otherwise = "No, it's not a localhost." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment