???????create the function palindrome


Assignment task: Got these two tasks that needs to be solved in Haskell. Solve them seperately and not in the same file. This is the SECOND time im posting this question, because I got the wrong answer earlier. Solve this question in Haskell and not any other languages!! Thank you!

a) ???????Create the function palindrome :: String -> Maybe Palindrome that takes a string and if it is a palindrome, stores the corresponding data as an element of type Palindrome and returns that element with Just. If the string is not a palindrome, the function must return Nothing.

b) Create the function toString :: Palindrome -> String that takes an element of type Palindrome and returns the string with the corresponding palindrome.

Note: "" is a palindrome of even length (without middle letter) and "a" is a palindrome of odd length (with 'a' as middle letter).

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: ???????create the function palindrome
Reference No:- TGS03252043

Expected delivery within 24 Hours