There is the inbuilt sort function, also sort-by is useful. In "The joy of clojure", there were an example of a lazy sort. It can be found here: http://www.manning.com/fogus/ In the file "q.clj" in the source code.
Jonathan On Tue, Sep 13, 2011 at 1:44 PM, Sunil S Nandihalli < sunil.nandiha...@gmail.com> wrote: > Hi Everybody, > I have a very large, but with finite size, collection. I would like to get > like first 10 elements in the sorted list . I would use a heap if I were in > c++ .. is there a inbuilt implementation of this in clojure? .. Is there > some other way to achieve this? some sort of lazy sort would be perfect. I > know I need the full collection to start with .. but that is fine. > Thanks, > Sunil. > > -- > 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 -- 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