Please sign in to comment.
Fix count for non-counted collections, remove ICounted from Cons
Since default no longer gets extended to ICounted, the original implementation of cljs.core/count no longer works on LazySeq instances. This patch takes the approach of checking whether the given collection is counted and either calling -count or a linear traversal helper (which rolls over to -count as soon as possible). The implementation of ICounted on Cons is now unnecessary and has been removed, so that things for which counted? returns true really do provide constant-time count.
- Loading branch information...