Browse Source

Create a hpal function which can compile

return function and palindrom function still to write.
DricomDragon 5 years ago
parent
commit
3f12d02369
1 changed files with 8 additions and 0 deletions
  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)