Internal method determining whether or not the provided arguments
can be smashed or extended together, based on types.

@param x The first item to compare.
@param y The second item to compare.
@param rc The running counter for comparing circular references.
@returns {boolean} An indication as to whether or not x and y were equal.
function isExtendable(...args) {
    // this is a fairly expensive call. find a way to optimize further?
    if (args.length < 1)
        return false;

    let baseType = typeForExtend(args[0]);
    if (!(
               baseType === types.array
            || baseType === types.object
            || baseType === types.set
            || baseType === types.map
            || baseType === types.function)) {
        return false;
    }
    for (let i = 1; i < args.length; i++) {
        let targetType = typeForExtend(args[i]);
        if (targetType !== baseType)
            return false;
    }
    return true;
}