let fold_atoms f s acc = S.fold (fun e acc -> match e with | Fresh _ -> acc | Atom a -> f a acc) s acc