I also have a weight-balanced tree implementation (quite experimental, but there are tests), in containers.data: `CCWBTree` (http://cedeela.fr/~simon/software/containers/CCWBTree.S.html). It should provide all the operations you ask for in O(log(n)), and takes a total order as a parameter. Cheers, Le Wed, 04 Nov 2015, Francois Berenger a écrit : > I am looking for even a simple implementation with at > least the following operations: > > insert/add, remove, mem/contains and at_rank. > > The at_rank is especially important since it is inefficient > to implement it using fold in a set like the ones from the stdlib. > > Thanks a lot, > F. -- Simon Cruanes http://weusepgp.info/ key 49AA62B6, fingerprint 949F EB87 8F06 59C6 D7D3 7D8D 4AC0 1D08 49AA 62B6