https://clojurians.slack.com/archives/C03S1KBA2/p1557433835426200
Well, that's almost certainly way oversimplified. The rabbit hole looks rather deep. Thoughts on approach welcome.
devn What is the rabbit hole that this patch leads to?
I don't think making seq
work on transients would be a viable solution
only way to do that would be to make a full copy of the data structure, is my hasty guess
(defn empty? [c] (zero? (count c)))
works for transients
I'm not sure that suggests any good implementation though; you wouldn't want to use that on lazy collections
switching on whether it's a transient or not leads to the old "does it make normal things slower?" conundrum
the most plausible thing I can imagine is rewriting empty?
in terms of a new interface or protocol
which sounds like at least moderately sized work