Ver Fonte

Create a hpal function which can compile

return function and palindrom function still to write.
DricomDragon há 5 anos atrás
pai
commit
3f12d02369
1 ficheiros alterados com 8 adições e 0 exclusões
  1. 8 0
      hpal.hs

+ 8 - 0
hpal.hs

@@ -0,0 +1,8 @@
+r _ = 1
+
+ispal n = True
+
+hpal n = 
+	if ispal n
+	then 0
+	else 1 + hpal (n + r n)