Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module Main where
- import Data.String.Utils
- main :: IO ()
- main =
- print [
- ends_with :: String -> String -> Bool
- ends_with str suffix = suffix `endswith` str
- check_googler_by :: String -> String
- check_googler_by email =
- if email `ends_with` "gmail.com"
- then name_from email ++ " is a Googler"
- else email
- where name_from = \full_email -> takeWhile (/= '@') full_email
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement