/* Delete an element with matching score/key from the skiplist. */
Delete an element with matching score/key from the skiplist.
/ * Delete an element with matching score / key from the skiplist . * /
func (this *SortedSet) delete(score SCORE, key string) bool {
	var update [SKIPLIST_MAXLEVEL]*SortedSetNode
	x := this.header
	for i := this.level - 1; i >= 0; i-- {
		for x.level[i].forward != nil &&
			(x.level[i].forward.score < score ||
				(x.level[i].forward.score == score &&
					x.level[i].forward.key < key)) {
			x = x.level[i].forward
		}
		update[i] = x
	}
	x = x.level[0].forward
	if x != nil && score == x.score && x.key == key {
		this.deleteNode(x, update)
		return true
	}
	return false 
}
func ( this * SortedSet ) delete ( score SCORE , key string ) bool { var update [ SKIPLIST_MAXLEVEL ] * SortedSetNode x := this . header for i := this . level - 1 ; i >= 0 ; i -- { for x . level [ i ] . forward != nil && ( x . level [ i ] . forward . score < score || ( x . level [ i ] . forward . score == score && x . level [ i ] . forward . key < key ) ) { x = x . level [ i ] . forward } update [ i ] = x } x = x . level [ 0 ] . forward if x != nil && score == x . score && x . key == key { this . deleteNode ( x , update ) return true } return false }
Delete an element with matching score/key from the skiplist.
Delete an element with matching score / key from the skiplist .
/* We may have multiple elements with the same score, what we need
	 * is to find the element with both the right score and object. */ // free x /* not found */