<commit_before>squishy = squishy
    .method('map', isFunction, function(a, b) {
        return compose(b, a);
    })
    .method('concat', isFunction, function(a, b) {
        return a().concat(b());
    })
    .method('ap', isFunction, function(a, b) {
        return function(x) {
            return a(x)(b(x));
        };
    });

squishy = squishy
    .method('concat', isBoolean, function(a, b) {
        return a & b;
    })
    .method('concat', squishy.liftA2(or, isNumber, isString), function(a, b) {
        return a + b;
    })
    .method('map', isBoolean, function(a, b) {
        return b(a);
    })
    .method('map', squishy.liftA2(or, isNumber, isString), function(a, b) {
        return b(a);
    });

//
//
//  ### equal
//
//  Checks to see if a type equals another type. This is a uses deep equality for
//  complex structures like `object` and `array`s.
//
squishy = squishy
    .method('equal', isBoolean, strictEquals)
    .method('equal', isFunction, strictEquals)
    .method('equal', isNumber, strictEquals)
    .method('equal', isString, strictEquals)
    .method('equal', isArray, function(a, b) {
        var env = this;
        /* We need to be sure that the lengths do actually match here. */
        if (and(a, b) && strictEquals(a.length, b.length)) {
            return env.fold(env.zip(a, b), true, function(v, t) {
                return v && env.equal(t._1, t._2);
            });
        } else return false;
    })
    .method('equal', isObject, function(a, b) {
        var i;
        /* We need to be sure that the there is an `a` and a `b` here. */
        if (and(a, b)) {
            /* This would be better if we turn objects into ordered 
               arrays so we can pass it through equal(a, b) */
            for (i in a) {
                if (!this.equal(a[i], b[i]))
                    return false;
            }
            for (i in b) {
                if (!this.equal(b[i], a[i]))
                    return false;
            }
            return true;
        } else return false;
    })
    .method('equal', strictEquals(null), strictEquals)
    .method('equal', strictEquals(undefined), strictEquals)<commit_msg>Make sure that when testing array and objects that they're the same type.<commit_after>squishy = squishy
    .method('map', isFunction, function(a, b) {
        return compose(b, a);
    })
    .method('concat', isFunction, function(a, b) {
        return a().concat(b());
    })
    .method('ap', isFunction, function(a, b) {
        return function(x) {
            return a(x)(b(x));
        };
    });

squishy = squishy
    .method('concat', isBoolean, function(a, b) {
        return a & b;
    })
    .method('concat', squishy.liftA2(or, isNumber, isString), function(a, b) {
        return a + b;
    })
    .method('map', isBoolean, function(a, b) {
        return b(a);
    })
    .method('map', squishy.liftA2(or, isNumber, isString), function(a, b) {
        return b(a);
    });

//
//
//  ### equal
//
//  Checks to see if a type equals another type. This is a uses deep equality for
//  complex structures like `object` and `array`s.
//
squishy = squishy
    .method('equal', isBoolean, strictEquals)
    .method('equal', isFunction, strictEquals)
    .method('equal', isNumber, strictEquals)
    .method('equal', isString, strictEquals)
    .method('equal', isArray, function(a, b) {
        var env = this;
        /* We need to be sure that the lengths do actually match here. */
        if (and(a, b) && isArray(b) && strictEquals(a.length, b.length)) {
            return env.fold(env.zip(a, b), true, function(v, t) {
                return v && env.equal(t._1, t._2);
            });
        } else return false;
    })
    .method('equal', isObject, function(a, b) {
        var i;
        /* We need to be sure that the there is an `a` and a `b` here. */
        if (and(a, b) && isObject(b)) {
            /* This would be better if we turn objects into ordered 
               arrays so we can pass it through equal(a, b) */
            for (i in a) {
                if (!this.equal(a[i], b[i]))
                    return false;
            }
            for (i in b) {
                if (!this.equal(b[i], a[i]))
                    return false;
            }
            return true;
        } else return false;
    })
    .method('equal', strictEquals(null), strictEquals)
    .method('equal', strictEquals(undefined), strictEquals)
{'fraction_non_alphanumeric': 0.1521494485707855, 'fraction_numerical': 0.0018005851901868107, 'mean_word_length': 1.950863213811421, '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': '1252243', 'n_tokens_mistral': 1417, 'n_tokens_neox': 1390, 'n_words': 415}