<commit_before>part of iterable;

/**
 * Returns a lazy iterable that filters out duplicates from the [iterator].
 * If [equals] and [hashCode] are omitted, the iterator uses the objects'
 * intrinsic [Object.operator==] and [Object.hashCode] for comparison.
 *
 * For example, the expression
 *
 *     unique([1, 2, 3, 2, 4])
 *
 * results in the list:
 *
 *     [1, 2, 3, 4]
 *
 */
Iterable /* <E> */ unique(Iterable /* <E> */ iterable, {bool equals(/* E */ e1, /* E */ e2),
                                                        int hashCode(/* E */ e)}) {
  return new _UniqueIterable(iterable, equals, hashCode);
}

class _UniqueIterable<E> extends IterableBase<E> {

  final Iterable<E> _iterable;
  final Function _equals;
  final Function _hashCode;

  _UniqueIterable(this._iterable, this._equals, this._hashCode);

  @override
  Iterator<E> get iterator {
    var uniques = new HashSet(equals: _equals, hashCode: _hashCode);<commit_msg>- cleaned up permutations too<commit_after>part of iterable;

/**
 * Returns a lazy iterable that filters out duplicates from the [iterator].
 * If [equals] and [hashCode] are omitted, the iterator uses the objects'
 * intrinsic [Object.operator==] and [Object.hashCode] for comparison.
 *
 * The following expression iterates over 1, 2, 3, and 4:
 *
 *     unique([1, 2, 3, 2, 4])
 *
 */
Iterable /* <E> */ unique(Iterable /* <E> */ iterable, {bool equals(/* E */ e1, /* E */ e2),
                                                        int hashCode(/* E */ e)}) {
  return new _UniqueIterable(iterable, equals, hashCode);
}

class _UniqueIterable<E> extends IterableBase<E> {

  final Iterable<E> _iterable;
  final Function _equals;
  final Function _hashCode;

  _UniqueIterable(this._iterable, this._equals, this._hashCode);

  @override
  Iterator<E> get iterator {
    var uniques = new HashSet(equals: _equals, hashCode: _hashCode);
{'fraction_non_alphanumeric': 0.1293057763645999, 'fraction_numerical': 0.011658717541070483, 'mean_word_length': 3.0, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2985398', 'n_tokens_mistral': 609, 'n_tokens_neox': 572, 'n_words': 191}