let rec set_of_list = function
    | [] -> empty
    | a::m -> union (singleton a) (set_of_list m)