Tassilo Horn <tass...@member.fsf.org> writes: Hi again,
> I use Justin Balthrop's (ninjudd) nice ordered-set library [fn:1] in > my application. Because I frequently merge several sets using `into', > I wondered if I could get a performance win if PersistentOrderedSet > would support going transient by implementing the IEditableCollection > interface by providing a new TransientOrderedSet class and the > relevant asTransient() method for PersistentOrderedSet. > > I've now added support for that (patch against the git master version > attached to this mail, or the complete java file posted at > http://pastebin.com/H2k9q75u where changes/additions start at line 202). > > Unfortunately, it doesn't work correctly, i.e., I get wrong results > (ordered sets that do not contain everything my test cases expect). But > I'm not able to produce some minimal test case at the repl. Now I've spotted the problem, although I don't know how to fix it yet. The problem is that my implementation doesn't work with LazySeqs. A minimal example at the REPL is that: funql.test.core> (into (ordered-set) (take 10 (iterate inc 0))) #{} Here, I want to put the first 10 natural numbers into the empty ordered set, but the result is empty. Any ideas? Bye, Tassilo -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en