fasterthanlime / shin

:warning: (def shin (dissoc clojurescript :jvm :google_closure)) (deprecated)
MIT License
35 stars 1 forks source link

Fix cond :else #75

Closed fasterthanlime closed 9 years ago

fasterthanlime commented 9 years ago

That's nonsense (generated code), it just happens to work:

    var count = exports.count = function count(coll) {
            if (nil$q.call(null, coll)) {
                return 0;
            } else {
                if (satisfies$q.call(null, ICounted, coll)) {
                    return $_count.call(null, coll);
                } else {
                    if (truthy.call(null, string$q.call(null, coll)) || truthy.call(null, array$q.call(null, coll))) {
                        return coll.length;
                    } else {
                        // I'm sorry, what?
                        if (keyword('else')) {
                            return accumulating$_seq$_count.call(null, coll);
                        }
                    }
                }
            }
        };