OK. I have figured it out. I just looked into core.clj and noticed that
keyfn is a function which know how to get a value from an element in a
collection. That value is just compared with other.

2009/11/7 Michael Jaaka <michael.ja...@googlemail.com>

> Hello I have such data
>
> [ [ "tom" 23 ] [ "ann" 4434 ] [ "tom" 1234 ] ["mike" 34 ] ]
>
> I would like to sort these data so finally i got
>
> [ [ "ann" 4434 ] ["mike" 34 ] [ "tom" 23 ] [ "tom" 1234 ]  ]
>
> note that i don't care the order between "tom" keys (1234 can be
> before 23)
>
> I have seen sort-by but I can't find tutorial how to use keyfn

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to