The standard library Setx api defines an interface for set implementations with one type parameter (’X’).
The Setx api is implemented by the red_black_setx_g package.
The Setx api source code is in src/lib/src/setx.api. The above information is manually maintained and may contain errors.
api { package key : api { Key X; compare : (Key(X ) , Key(X )) -> Order;};; Item X = key::Key(X ); Set X; empty : Set(X ); singleton : Item(X ) -> Set(X ); add : (Set(X ) , Item(X )) -> Set(X ); add' : (Item(X ) , Set(X )) -> Set(X ); add_list : (Set(X ) , List(Item(X ) )) -> Set(X ); drop : (Set(X ) , Item(X )) -> Set(X ); member : (Set(X ) , Item(X )) -> Bool; is_empty : Set(X ) -> Bool; equal : (Set(X ) , Set(X )) -> Bool; compare : (Set(X ) , Set(X )) -> Order; is_subset : (Set(X ) , Set(X )) -> Bool; vals_count : Set(X ) -> Int; vals_list : Set(X ) -> List(Item(X ) ); union : (Set(X ) , Set(X )) -> Set(X ); intersection : (Set(X ) , Set(X )) -> Set(X ); difference : (Set(X ) , Set(X )) -> Set(X ); map : (Item(X ) -> Item(X )) -> Set(X ) -> Set(X ); apply : (Item(X ) -> Void) -> Set(X ) -> Void; fold_forward : ((Item(X ) , Y) -> Y) -> Y -> Set(X ) -> Y; fold_backward : ((Item(X ) , Y) -> Y) -> Y -> Set(X ) -> Y; partition : (Item(X ) -> Bool) -> Set(X ) -> (Set(X ) , Set(X )); filter : (Item(X ) -> Bool) -> Set(X ) -> Set(X ); exists : (Item(X ) -> Bool) -> Set(X ) -> Bool; find : (Item(X ) -> Bool) -> Set(X ) -> Null_Or(Item(X ) ); all_invariants_hold : Set(X ) -> Bool;};