코드

~cpp
module Palindrome
	where

palindrome string = (string == (reverse string))

사용

~cpp
Palindrome> palindrome "hahaha"
False
Palindrome> palindrome "eye"
True
Palindrome>
Retrieved from http://wiki.zeropage.org/wiki.php/Basic알고리즘/팰린드롬/임인택
last modified 2021-02-07 05:22:34