function resolve(inputs, context, index, info) {
    let cacheable = true;
    let i, ilen, value;
    for(i = 0, ilen = inputs.length; i < ilen; ++i){
        value = inputs[i];
        if (value === undefined) {
            continue;
        }
        if (context !== undefined && typeof value === 'function') {
            value = value(context);
            cacheable = false;
        }
        if (index !== undefined && isArray(value)) {
            value = value[index % value.length];
            cacheable = false;
        }
        if (value !== undefined) {
            if (info && !cacheable) {
                info.cacheable = false;
            }
            return value;
        }
    }
}
Evaluates the given `inputs` sequentially and returns the first defined value.
@param inputs - An array of values, falling back to the last value.
@param context - If defined and the current value is a function, the value
is called with `context` as first argument and the result becomes the new input.
@param index - If defined and the current value is an array, the value
at `index` become the new input.
@param info - object to return information about resolution in
@param info.cacheable - Will be set to `false` if option is not cacheable.
@since 2.7.0