Question: Please code in Haskell: Problem 10 (7 marks) Using only list comprehensions, implement a shift cipher (also known as a Caesar cipher). Given an integer
Please code in Haskell:

Problem 10 (7 marks) Using only list comprehensions, implement a shift cipher (also known as a Caesar cipher). Given an integer 'n' and a string, the string should be encrypted with a shift 'n' letters down the alphabet. You should also have a function to decrypt the cipher given the same 'n' value OR decrypt by using your encryption function with nE where nE is the original value used to encrypt the string You do not need to worry about special characters or case preservation (but bonus marks may be awarded for maintaining them). So for example encrypting the string "Hello class" with n 1 could be represented as lFMMPDMBTT" or "immpdmbtt" Note: This can be implemented in a single nested list comprehension, however, you are free to use as many as you like. And you can assemble them piecewise if it better helps you to understand the
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
