Randomized q , implemented except iterator
Randomized q with iterator not tested