haskell's a bitch
first time programming , and i'm given tutorial exercises to which I have no idea how to complete. eugh.
Using the function rotate from the previous question, write a function
makeKey :: Int -> [(Char, Char)]
that returns the cipher key with the given offset. See above for the description of how the cipher key is represented as a list of pairs. Example:
Main> makeKey 5 [(’A’,’F’),(’B’,’G’),(’C’,’H’),(’D’,’I’),(’E’,’J’),(’F’,’K’), (’G’,’L’),(’H’,’M’),(’I’,’N’),(’J’,’O’),(’K’,’P’),(’L’,’Q’), (’M’,’R’),(’N’,’S’),(’O’,’T’),(’P’,’U’),(’Q’,’V’),(’R’,’W’), (’S’,’X’),(’T’,’Y’),(’U’,’Z’),(’V’,’A’),(’W’,’B’),(’X’,’C’), (’Y’,’D’),(’Z’,’E’)]
The cipher key should show how to encrypt all of the uppercase English letters, and there should be no duplicates: each letter should appear just once amongst the pairs’ first compo- nents (and just once amongst the second components).
i mean seriously what the hell