浏览代码

exercise 5.7: palindrome function

George C. Privon 1 年之前
父节点
当前提交
f4f5cdfc29
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8 0
      05-Lists/exercises/ex5.7.hs

+ 8 - 0
05-Lists/exercises/ex5.7.hs

@@ -0,0 +1,8 @@
+-- Exercise 5.7
+-- George C. Privon
+-- 2024-07-20
+
+palindrome :: String -> Bool
+palindrome word = if word == reverse word
+                  then True
+                  else False