[Haskell-cafe] how to write a loop in haskell way