Selaa lähdekoodia

Create a hpal function which can compile

return function and palindrom function still to write.
DricomDragon 5 vuotta sitten
vanhempi
commit
3f12d02369
1 muutettua tiedostoa jossa 8 lisäystä ja 0 poistoa
  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)