Explorar el Código

Create a hpal function which can compile

return function and palindrom function still to write.
DricomDragon hace 5 años
padre
commit
3f12d02369
Se han modificado 1 ficheros con 8 adiciones y 0 borrados
  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)