<commit_before>// Returns elements that are found only in one of given lists

'use strict';

var filter        = Array.prototype.filter
  , push          = Array.prototype.push
  , call          = Function.prototype.call
  , assertNotNull = require('../../assert-not-null')
  , not           = require('../../Function/prototype/not')
  , byLength      = call.bind(require('../../Object/get-compare-by')('length'))
  , toArray       = require('../../Object/prototype/to-array')
  , contains      = require('./contains')
  , copy          = require('./copy');

module.exports = function () {
	var lists, seen, result;
	assertNotNull(this);
	if (arguments.length) {
		push.apply(lists = [this], arguments);
		seen = [];
		result = [];
		lists.sort(byLength).forEach(function (list) {
			result = result.filter(not.call(contains.bind(list)))
				.concat(filter.call(list, not.call(contains.bind(seen))));
			push.apply(seen, toArray.call(list));
		});
		return result;
	} else {
		return copy.call(this);
	}
};<commit_msg>Make Array's exclusion function length equal 1<commit_after>// Returns elements that are found only in one of given lists

'use strict';

var filter        = Array.prototype.filter
  , push          = Array.prototype.push
  , call          = Function.prototype.call
  , assertNotNull = require('../../assert-not-null')
  , not           = require('../../Function/prototype/not')
  , byLength      = call.bind(require('../../Object/get-compare-by')('length'))
  , toArray       = require('../../Object/prototype/to-array')
  , contains      = require('./contains')
  , copy          = require('./copy');

module.exports = function (list) {
	var lists, seen, result;
	assertNotNull(this);
	if (arguments.length) {
		push.apply(lists = [this], arguments);
		seen = [];
		result = [];
		lists.sort(byLength).forEach(function (list) {
			result = result.filter(not.call(contains.bind(list)))
				.concat(filter.call(list, not.call(contains.bind(seen))));
			push.apply(seen, toArray.call(list));
		});
		return result;
	} else {
		return copy.call(this);
	}
};
{'fraction_non_alphanumeric': 0.1789676796912687, 'fraction_numerical': 0.000482392667631452, 'mean_word_length': 2.9058380414312617, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '950034', 'n_tokens_mistral': 655, 'n_tokens_neox': 623, 'n_words': 127}