Created
September 3, 2019 10:08
-
-
Save pirrmann/260a14794f4f0168d446de4bd12f6c06 to your computer and use it in GitHub Desktop.
Rot13-starter.fsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let stringToCharList (s:string) = Seq.toList s | |
let charListToString (chars: char list) = System.String(List.toArray chars) | |
let shiftCharList (charList: char list) = | |
charList // not really shifted | |
let rot13 (s: string) = | |
let charList = stringToCharList s | |
let shiftedCharList = shiftCharList charList | |
charListToString shiftedCharList | |
rot13 "sample" | |
rot13 "fnzcyr" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment