[Haskell] question : updating an array