daily pastebin goal
58%
SHARE
TWEET

Untitled

a guest Jan 22nd, 2018 115 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. import Maybe
  3. import Data.List
  4.  
  5. lcase str =
  6.     [ if elem c ['A'..'Z']
  7.         then ['a'..'z'] !! fromMaybe 0 (elemIndex c ['A'..'Z'])
  8.         else c | c <- str
  9.     ]
  10.  
  11. main = do {
  12.     print (lcase "Moo")
  13. }
RAW Paste Data
Top