Question: Please use the Haskell Programming language Encoding and Decoding e Exercise: Define a function let2nat :: Char Int that converts a lower-case letter in the

Please use the Haskell Programming language

Please use the Haskell Programming language Encoding and Decoding e Exercise: Define

Encoding and Decoding e Exercise: Define a function let2nat :: Char Int that converts a lower-case letter in the range 'a' to 'z' into the corresponding natural number in the range 0 to 25. For example: let2nat'a' >let2nat z' 25 e Exercise: Define a function nat2let :: Int Char that performs the inverse function to let2nat. For example: > nat2let 0 > nat2let 25 . Exercise: Using let2nat and nat2let, define a function shift :: Int Char Char that applies a shift factor in the range 0 to 25 to a lower-case letter in the range'a' to 'z'. Characters outside this range, such as upper-case letters and punctuation, should be returned unshifted. Take care to ensure that your function wraps around at the end of the alphabet. For example: > shift 3'h' >shift 3 'z' >shift 3 'H

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!