famous Twitter Waterflow problem in Haskell