Decrements @member by @by within the sorted set
436792
def decr(self, member, by=1):
        
        return self._client.zincrby(
            self.key_prefix, self._dumps(member), by * -1)
134762
def filter_new_members(cls)
      members = cls.all_local_members.find_all do |m|
        visible?(m) && (m[:new] || new_params?(m))
      end
      members = discard_accessors(members)
      members.sort! {|a, b| a[:name] <=> b[:name] }
    end
120498
def increment(key, by: 1)
      if by.is_a?(Float)
        self.connection.hincrbyfloat(@key, key, by.to_f).to_f
      else
        self.connection.hincrby(@key, key, by.to_i).to_i
      end
    end
1314626
private static <T> ArrayList<T> sorted(Collection<T> cls, Comparator<? super T> c) {
    ArrayList<T> sorted = new ArrayList<>(cls);
    sorted.sort(c);
    return sorted;
  }
668843
public static <T> Set<T> minus(Set<T> self, Collection<?> removeMe) {
        Comparator comparator = (self instanceof SortedSet) ? ((SortedSet) self).comparator() : null;
        final Set<T> ansSet = createSimilarSet(self);
        ansSet.addAll(self);
        if (removeMe != null) {
            for (T o1 : self) {
                for (Object o2 : removeMe) {
                    boolean areEqual = (comparator != null) ? (comparator.compare(o1, o2) == 0) : coercedEquals(o1, o2);
                    if (areEqual) {
                        ansSet.remove(o1);
                    }
                }
            }
        }
        return ansSet;
    }
642716
def compact
      sort_by(&:length).each_with_object([]) do |c, result|
        result << c unless result.any? { |r| c.start_with?(r) }
      end.compact
    end
619402
function lrem(count, value) {
  var ind, deleted = 0;
  if(count === 0) {
    while((ind = this.indexOf(value)) !== -1) {
      this._data.splice(ind, 1);
      deleted++;
    }
  }else if(count > 0) {
    while((ind = this.indexOf(value)) !== -1 && (deleted < count)) {
      this._data.splice(ind, 1);
      deleted++;
    }
  }else{
    count = Math.abs(count);
    while((ind = this.lastIndexOf(value)) !== -1 && (deleted < count)) {
      this._data.splice(ind, 1);
      deleted++;
    }
  }
  return deleted;
}
517577
public static <T> SortedSet<T> minus(SortedSet<T> self, Object removeMe) {
        return (SortedSet<T>) minus((Set<T>) self, removeMe);
    }
859366
def first_set
      @first_set ||= Racc.set_closure([self]) do |sym|
        sym.heads.each_with_object([]) do |ptr, next_syms|
          while !ptr.reduce?
            next_syms << ptr.symbol
            ptr.symbol.nullable? ? ptr = ptr.next : break
          end
        end
      end.freeze
    end
1120051
private void fixdownMinWithComparator(int k) {
        int c = 2 * k;
        while (c <= size) {
            int m = minChildOrGrandchildWithComparator(k);
            if (m > c + 1) { // grandchild
                if (comparator.compare(array[m], array[k]) >= 0) {
                    break;
                }
                K tmp = array[k];
                array[k] = array[m];
                array[m] = tmp;
                if (comparator.compare(array[m], array[m / 2]) > 0) {
                    tmp = array[m];
                    array[m] = array[m / 2];
                    array[m / 2] = tmp;
                }
                // go down
                k = m;
                c = 2 * k;
            } else { // child
                if (comparator.compare(array[m], array[k]) < 0) {
                    K tmp = array[k];
                    array[k] = array[m];
                    array[m] = tmp;
                }
                break;
            }
        }
    }
1152254
function (iterator, accumulator, context) {
        return _.reduce(this.members, _.isFunction(iterator) ? iterator.bind(context || this) : iterator, accumulator);
    }
42267
def _condense(self, data):
    '''
    
    '''
    if data:
      return reduce(operator.ior, data.values())
    return set()
630383
def zrem(self, key, member, *members):
        """"""
        return self.execute(b'ZREM', key, member, *members)
302796
function(property, sorted) {
            var setters = this.__collectAllPropertyValues.apply(this, ['__setters', 1].concat(property || []));

            if (!property) {
                return setters;
            }

            setters = setters[property];

            if (!sorted) {
                return setters[property];
            }

            var sortedSetters = [];

            for (var name in setters) {
                sortedSetters.push(setters[name]);
            }

            sortedSetters = sortedSetters.sort(function(s1, s2) { return s2[0] - s1[0]; });

            for (var i = 0, ii = sortedSetters.length; i < ii; ++i) {
                sortedSetters[i] = sortedSetters[i][1];
            }

            return sortedSetters;
        }
864161
void discardUnusedTail()
    {
        // we guard this with the OpOrdering instead of synchronised due to potential dead-lock with CLSM.advanceAllocatingFrom()
        // this actually isn't strictly necessary, as currently all calls to discardUnusedTail occur within a block
        // already protected by this OpOrdering, but to prevent future potential mistakes, we duplicate the protection here
        // so that the contract between discardUnusedTail() and sync() is more explicit.
        try (OpOrder.Group group = appendOrder.start())
        {
            while (true)
            {
                int prev = allocatePosition.get();
                // we set allocatePosition past buffer.capacity() to make sure we always set discardedTailFrom
                int next = buffer.capacity() + 1;
                if (prev == next)
                    return;
                if (allocatePosition.compareAndSet(prev, next))
                {
                    discardedTailFrom = prev;
                    return;
                }
            }
        }
    }
1342079
function byLevel (a, b) {
    if (no(cachedLevelOf[a])) cachedLevelOf[a] = computeLevelOf(a)

    if (no(cachedLevelOf[b])) cachedLevelOf[b] = computeLevelOf(b)

    return cachedLevelOf[a] - cachedLevelOf[b]
  }
1175497
function zadd(key /* score-1, member-1, score-N, member-N, req */) {
  var args = slice.call(arguments, 1)
    , req = typeof args[args.length-1] === 'object' ? args.pop() : null
    , val = this.getKey(key, req);

  if(val === undefined) {
    val = new SortedSet();
    this.setKey(key, val, undefined, undefined, undefined, req);
  }

  return val.zadd(args);
}