Question: For all questions in this assignment, write Haskell code that computes the specified function. Use good Haskell style by including in your code the signature

For all questions in this assignment, write Haskell code that computes the specified function. Use good Haskell style by including in your code the signature of each top-level function above its definition (most signatures are actually provided in the questions). You can include as many other (helper) functions as you like. For all questions in this assignment, write Haskell code that computes the Once again , please write the code in haskell language.

a) Write a function palindrome : [Char]Bool that tells you whether a given string is a palindrome, i.e., whether it is identical when read left-to-right and right-to- left. (b) Write a function oddEvenCount [Int] (Int, Int) that receives a list of integers and returns a pair (a, b), where a and b stand for the number of odd and even integers, respectively, that are contained in the list. (c) Write a function caesar :: [Char][Char] that receives a string of small letters and returns its encoding in Caesar's code. This means that every 'a' turns into a 'b', every 'b' into a c', every c' into a 'd', and so on, and finally, every 'z' into an a. Hint: Look at the successor function succ to make your life easier. a) Write a function palindrome : [Char]Bool that tells you whether a given string is a palindrome, i.e., whether it is identical when read left-to-right and right-to- left. (b) Write a function oddEvenCount [Int] (Int, Int) that receives a list of integers and returns a pair (a, b), where a and b stand for the number of odd and even integers, respectively, that are contained in the list. (c) Write a function caesar :: [Char][Char] that receives a string of small letters and returns its encoding in Caesar's code. This means that every 'a' turns into a 'b', every 'b' into a c', every c' into a 'd', and so on, and finally, every 'z' into an a. Hint: Look at the successor function succ to make your life easier

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!