Skip to content

Instantly share code, notes, and snippets.

@jagajaga
Created April 24, 2015 23:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jagajaga/7ca7e9fc8de7014253f5 to your computer and use it in GitHub Desktop.
Save jagajaga/7ca7e9fc8de7014253f5 to your computer and use it in GitHub Desktop.
import Control.Monad.Fix
import Data.Char
main = interact $ unlines . map (fix (\f word -> case word of
[] -> []
(x:s:xs) -> toLower x : toUpper s : f xs
xs -> xs)) . lines
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment