let rec remove_elements prng proba = function | [] -> [] | a::q -> if Femtolib.Random2.float_lp prng < proba then remove_elements prng proba q else a :: remove_elements prng proba q