insert_sorted_iter


Description:

public SequenceIter<G> insert_sorted_iter (owned G data, SequenceIterCompareFunc<G> iter_cmp)

Like insert_sorted, but uses a SequenceIterCompareFunc instead of a CompareDataFunc as the compare function.

iter_cmp is called with two iterators pointing into this. It should return 0 if the iterators are equal, a negative value if the first iterator comes before the second, and a positive value if the second iterator comes before the first.

It is called with two iterators pointing into this. It should return 0 if the iterators are equal, a negative value if the first iterator comes before the second, and a positive value if the second iterator comes before the first.

Parameters:

this

a Sequence

data

data for the new item

iter_cmp

the function used to compare iterators in the sequence

cmp_data

user data passed to cmp_func

Returns:

a SequenceIter pointing to the new item