let rec list_remove_dupq l = List.fold_left (fun df x -> if List.memq x df then df else x :: df) [] l