Skip to content

Instantly share code, notes, and snippets.

@oakmac
Created December 24, 2013 00:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oakmac/8106867 to your computer and use it in GitHub Desktop.
Save oakmac/8106867 to your computer and use it in GitHub Desktop.
(def people [
{
:first-name "Phil"
:last-name "Gambling"
:age 31
}
{
:first-name "Chris"
:last-name "Pounds"
:age 26
}])
(sort-by :age people)
(sort-by :full-name
(map
#(assoc % :full-name (str (:first-name %) " " (:last-name %)))
people)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment