Guest User

Untitled

a guest
May 27th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. import Char
  2.  
  3. rot13 :: String -> String
  4. rot13 = map (chr . rot . ord)
  5. where
  6. rot o | (o `inn` (78, 90)) || (o `inn` (110, 122)) = o - 13
  7. rot o | o `inn` (65, 77) || o `inn` ( 97, 109) = o + 13
  8. rot o = o
  9. i `inn` (x, y) = i >= x && i <= y
Add Comment
Please, Sign In to add comment