Skip to content

Instantly share code, notes, and snippets.

@favonia
Created February 13, 2019 02:26
Show Gist options
  • Save favonia/05802693cf6ee1b1c80b245f7c883167 to your computer and use it in GitHub Desktop.
Save favonia/05802693cf6ee1b1c80b245f7c883167 to your computer and use it in GitHub Desktop.
import Data.Char
import Data.List
import Control.Applicative
up :: String -> String
up = map toUpper
convertWord :: String -> String
convertWord = intercalate "\\ls " . map pure . up
convert :: String -> String
convert = intercalate "\\ns " . map convertWord . words
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment