resample in haskell