[Haskell-cafe] looking for a good algorithm