Safe HaskellSafe

S03

Contents

Synopsis

Exercise 2

rotate :: Int -> [a] -> [a] Source #

Exercise 3

int2let :: Int -> Char Source #

Transform an integer into a lowercase letter (where 0 is a and 25 is z).

let2int :: Char -> Int Source #

Transform a lowercase letter into an integer.

shift :: Int -> Char -> Char Source #

Shift a lowercase letter by a given number of positions in the alphabet.

encode :: Int -> String -> String Source #

Shift all lowercase letters in the input string by a given number of positions in the alphabet, thereby applying Caesar's cipher.

Exercise 4

freqs :: String -> [Double] Source #

Exercise 5

chisqr :: [Double] -> [Double] -> Double Source #

Exercise 6

crack :: String -> String Source #