hpal.hs 80 B

12345678
  1. r _ = 1
  2. ispal n = True
  3. hpal n =
  4. if ispal n
  5. then 0
  6. else 1 + hpal (n + r n)