#region "distinct" Distinct elements on list
189540
function distinct() {
        
        //Data for output
        var outData = [];

        //For each element on current instance
        for (var i = 0; i < this.items.length; i++) {

            //Flag for element found
            var wasFound = false;

            //Check if element is already on outData
            for (var n = 0; n < outData.length; n++) {

                //If current element on "i" matches the one on "n"
				if (equals(outData[n], this.items[i])){
                    wasFound = true;
                    break;
                }
            }

            //If element was not found, append to output
            if (!wasFound)
                outData.push(this.items[i]);
        }

        //Return for chaining
        return new jslinq(outData);
    }
601747
def unique(iterable):
    
    seen = set()
    return [x for x in iterable if x not in seen and not seen.add(x)]
125515
def unique (inlist):
    
    uniques = []
    for item in inlist:
        if item not in uniques:
            uniques.append(item)
    return uniques
279387
public static <T> List<T> distinct(final T[] a) {
        if (N.isNullOrEmpty(a)) {
            return new ArrayList<>();
        }

        return distinct(a, 0, a.length);
    }
970726
def _get_distinct_objs(objs):
    
    ids = set()
    res = []
    for obj in objs:
        if not id(obj) in ids:
            ids.add(id(obj))
            res.append(obj)
    return res
1266981
public static boolean[] distinct(final boolean[] a, final int fromIndex, final int toIndex) {
        return N.removeDuplicates(a, fromIndex, toIndex, false);
    }
1156518
function() {
				if ( list ) {
					var args = arguments,
						argIndex = 0,
						argLength = args.length;
					for ( ; argIndex < argLength ; argIndex++ ) {
						for ( var i = 0; i < list.length; i++ ) {
							if ( args[ argIndex ] === list[ i ] ) {
								// Handle firingIndex and firingLength
								if ( firing ) {
									if ( i <= firingLength ) {
										firingLength--;
										if ( i <= firingIndex ) {
											firingIndex--;
										}
									}
								}
								// Remove the element
								list.splice( i--, 1 );
								// If we have some unicity property then
								// we only need to do this once
								if ( flags.unique ) {
									break;
								}
							}
						}
					}
				}
				return this;
			}
880643
def uniqued(iterable):
    
    seen = set()
    add = seen.add
    return [i for i in iterable if i not in seen and not add(i)]
644917
def prettylist(list_):
    
    if not list_:
        return ''

    values = set()
    uniqueList = []

    for entry in list_:
        if not entry in values:
            values.add(entry)
            uniqueList.append(entry)

    return uniqueList[0] if len(uniqueList) == 1 \
        else '[' + '; '.join(uniqueList) + ']'
684990
public function getDistinctString() {
    $distinct = array();
    if (is_array($s = $this->getDistinct()) && !empty($s)) {
      foreach ($s as $distinctAttribute) {
        $item = array();
        if ($distinctAttribute['dist_key'] != 'none_dist') {
          if (is_array($distinctAttribute) && !empty($distinctAttribute)) {
            foreach ($distinctAttribute as $k => $v) {
              $item[] = $k . ":" . $v;
            }
          }
          $distinct[] = implode(",", $item);
        } else {
          $distinct[] = $distinctAttribute['dist_key'];
        }
      }
    }
    return implode(";", $distinct);
  }
120832
def unique(values):
    '''
    
    '''
    ret = None
    if isinstance(values, collections.Hashable):
        ret = set(values)
    else:
        ret = []
        for value in values:
            if value not in ret:
                ret.append(value)
    return ret
828681
function unique(list) {
  return Object.keys(list.reduce((obj, key) => {
    if (!hasProp.call(obj, key)) {
      obj[key] = true;
    }
    return obj;
  }, {}));
}
231564
def iflag_unique_items(list_):
    
    seen = set()
    def unseen(item):
        if item in seen:
            return False
        seen.add(item)
        return True
    flag_iter = (unseen(item) for item in list_)
    return flag_iter
52227
def unique(seq):
    """"""
    seen = {}
    result = []
    for item in seq:
        marker = item
        if marker in seen:
            continue
        seen[marker] = 1
        result.append(item)
    return result
1248096
def unique_list(input_, key=lambda x:x):
    """"""
    seen = set()
    output = []
    for x in input_:
        keyx = key(x)
        if keyx not in seen:
            seen.add(keyx)
            output.append(x)
    return output
790695
def unique(iterable):
    
    """
    d = {}
    return (d.setdefault(x,x) for x in iterable if x not in d)
70960
public static <T> Iterator<T> distinct(final Iterator<T> iterator) {
        requireNonNull(iterator);
        return new AbstractIterator<T>() {
            private final PeekingIterator<T> peekingIterator = peekingIterator(iterator);
            private T curr = null;

            @Override
            protected T computeNext() {
                while (peekingIterator.hasNext() && Objects.equals(curr, peekingIterator.peek())) {
                    peekingIterator.next();
                }
                if (!peekingIterator.hasNext())
                    return endOfData();

                curr = peekingIterator.next();
                return curr;
            }
        };
    }