Better solution for Haskell calculating digits of number in task 16-power-digit-sum