using haskell arrays, recursion still doesnt work