Skip to content

Instantly share code, notes, and snippets.

@deque-blog
Created June 13, 2017 10:05
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 deque-blog/d3c1f6940f974497c6140f7f714b3129 to your computer and use it in GitHub Desktop.
Save deque-blog/d3c1f6940f974497c6140f7f714b3129 to your computer and use it in GitHub Desktop.
caesar_cipher : Int -> String -> String
caesar_cipher shift input =
let cipher = chr . (+ shift) . ord
in pack $ map cipher (unpack input)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment