structure Set = struct type 'a set = 'a list; val emptyset: 'a set = []; val rec isin = fn x => (fn [] => false | y::l => if (x = y) then true else isin x l); val addin = fn x => fn l => if (isin x l) then l else x::l; val rec removefrom = fn x => (fn [] => [] | y::l => if (x = y) then l else y::(removefrom x l)); end;