{'type': 'list', 'logical': 'oneof'}
766394
def _validate_oneof(self, definitions, field, value):
        
        valids, _errors = \
            self.__validate_logical('oneof', definitions, field, value)
        if valids != 1:
            self._error(field, errors.ONEOF, _errors,
                        valids, len(definitions))
1172103
function (fn) {
        var list = this.list,
            idx;
        if(validateFn(fn)){
            idx = list.indexOf(fn);
            list.splice(idx, 1);
        }
        
        return this;
    }
768613
function List(length) {
        if (arguments.length === 0) {
            length = 0;
        }

        // in this case we create a list with a given length
        if (arguments.length <= 1 && typeof length === 'number') {
            if (this instanceof List) {
                this.length = length;
            }
            else {
                return new List(length);
            }
        }
        else {
            //here we create a list with initial values
            if (!(this instanceof List)) {
                return List.fromArray(arrSlice(arguments));
            }
            else {
                for (var i = 0, l = arguments.length ; i < l ; i++) {
                    this[i] = arguments[i];
                }
                this.length = arguments.length;
            }
        }
    }
1255622
def one_of(s):
    ''''''
    @Parser
    def one_of_parser(text, index=0):
        if index < len(text) and text[index] in s:
            return Value.success(index + 1, text[index])
        else:
            return Value.failure(index, 'one of {}'.format(s))
    return one_of_parser
668907
public static <T> List<T> listOfOne(final T one) {
        List<T> list = new ArrayList<>();
        list.add(one);
        return list;
    }
297152
def is_one_of(obj, types):
    """"""
    for type_ in types:
        if isinstance(obj, type_):
            return True
    return False
529809
function tuple5Of(a, b, c, d, e) {
    var self = getInstance(this, tuple5Of);
    self.types = rest(arguments);
    return self;
}
822642
def simplify_list(maybe_list):
    """"""
    if isinstance(maybe_list, MutableSequence):
        is_list = aslist(maybe_list)
        if len(is_list) == 1:
            return is_list[0]
    return maybe_list
274865
function each(list, fn) {
  var len = list ? list.length : 0;
  var i = 0;
  for (; i < len; ++i) {
    fn(list[i], i);
  }
  return list
}
1157685
function indexOf(list, item) {
  if (NATIVE_ARRAY_INDEXOF) {
    return NATIVE_ARRAY_INDEXOF.call(list, item);
  }

  for (var i = 0; i < list.length; i++) {
    if (list[i] === item) {
      return i;
    }
  }

  return -1;
}
1175204
function parseList(list, whitelist, context) {
    const parsed = list.split(',');
    parsed.forEach(item => checkWhitelist(item, whitelist, context));
    return parsed;
}
1137720
def make_list(obj, cast=True):
    
    if isinstance(obj, list):
        return list(obj)
    elif is_lazy_iterable(obj):
        return list(obj)
    elif isinstance(obj, (tuple, set)) and cast:
        return list(obj)
    else:
        return [obj]
411630
def is_list_of_list(item):
    
    if (
        type(item) in (list, tuple)
        and len(item)
        and isinstance(item[0], (list, tuple))
    ):
        return True
    return False
186112
def parse_list(lexer: Lexer, is_const: bool) -> ListValueNode:
    """"""
    start = lexer.token
    item = parse_const_value if is_const else parse_value_value
    return ListValueNode(
        values=any_nodes(lexer, TokenKind.BRACKET_L, item, TokenKind.BRACKET_R),
        loc=loc(lexer, start),
    )
420078
def visit(d, op):
    """"""
    op(d)
    if isinstance(d, list):
        for i in d:
            visit(i, op)
    elif isinstance(d, dict):
        for i in itervalues(d):
            visit(i, op)
696178
def _index_list(key_or_list, direction=None):
    
    if direction is not None:
        return [(key_or_list, direction)]
    else:
        if isinstance(key_or_list, string_type):
            return [(key_or_list, ASCENDING)]
        elif not isinstance(key_or_list, (list, tuple)):
            raise TypeError("if no direction is specified, "
                            "key_or_list must be an instance of list")
        return key_or_list
725698
function TypedOneOf (config) {
    const oneOf = this;

    // validate oneOf
    if (!config.hasOwnProperty('oneOf')) {
        throw Error('Invalid configuration. Missing required one-of property: oneOf. Must be an array of schema configurations.');
    }
    if (!Array.isArray(config.oneOf) || config.oneOf.filter(v => !v || typeof v !== 'object').length) {
        throw Error('Invalid configuration value for property: oneOf. Must be an array of schema configurations.');
    }

    // create each unique schema
    const hashes = {};
    const schemas = config.oneOf
        .map(item => FullyTyped(item))
        .filter(schema => {
            const hash = schema.hash();
            if (hashes[hash]) return false;
            hashes[hash] = true;
            return true;
        });

    // define properties
    Object.defineProperties(oneOf, {

        oneOf: {
            /**
             * @property
             * @name TypedOneOf#oneOf
             * @type {object}
             */
            value: schemas,
            writable: false
        }

    });

    return oneOf;
}