:: Int -> IO a -> IO [a] package:sampling

(O(n log n)) resample specialized to IO.