sqrt iterator in haskell