Ver Fonte

exercise 5.7: palindrome function

George C. Privon há 1 ano atrás
pai
commit
f4f5cdfc29
1 ficheiros alterados com 8 adições e 0 exclusões
  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