Hi, Am Freitag, 10. Juni 2011 06:49:41 UTC+2 schrieb Sunil Nandihalli: > > as long as (reversible? of-whatever-collection) is true , last is almost a > constant time operation >
In theory, but not in practice. last will always be O(N) in it's current implementation. The only fast way to get the last element is peek on a vector or (first (rseq ...)) for collections supporting rseq. Sincerely Meikel -- 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