ninetynine-1.3.0: Ninety-Nine Haskell Problems
CopyrightCopyright (C) 2021 Yoo Chung
LicenseGPL-3.0-or-later
Maintainerdev@chungyc.org
Safe HaskellSafe-Inferred
LanguageGHC2021

Problems.P06

Description

Part of Ninety-Nine Haskell Problems. Some solutions are in Solutions.P06.

Synopsis

Documentation

isPalindrome :: Eq a => [a] -> Bool Source #

Find out whether a list is a palindrome. A palindrome can be read forward or backward; e.g. "xamax".

Examples

>>> isPalindrome [1,2,3]
False
>>> isPalindrome "madamimadam"
True
>>> isPalindrome [1,2,4,8,16,8,4,2,1]
True