Question: Use haskell to solve the problem without using high-order functions. Include a brief explanation if possible. Please & thank you! A palindrome is a sentence
Use haskell to solve the problem without using high-order functions. Include a brief explanation if possible. Please & thank you!

A palindrome is a sentence or phrase that is the same forwards and backwards, ignoring spaces, punctuation and other special characters, and upper vs. lower case. In this problem we will consider palindromes that include only letters, digits, and spaces but don't include any punctuation or any special characters - for example "a01 02 2010A", "Yreka Bakery", and "Doc note I dissent a fast never prevents a fatness I diet on cod". Assume that letters are case insensitive - for example "Madam Im Adam" Write a Haskell function isPa lindrome that takes a string as argument and that returns True if the string is a palindrome and Fa lse otherwise. (Note: you can make use of the following Haskell functions: reverse (for reversing a list), toupper (for retrieving the uppercase of a given character). You can include toupper from the Data. Char module, i.e., include the following line in the beginning of your module: import Data.Char (toUpper)) The type of isPalindrome should be: ispalindrome :: [Char] -> Bool Examples: > isPalindrome "a01 02 2010A" True > isPalindrome "Doc note I dissent a fast never prevents a fatness I diet on cod" True > isPalindrome "Yreka Bakery" True > isPalindrome "top cart pop tracPOT
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
