Skip to content

Instantly share code, notes, and snippets.

@johnynek
Created March 7, 2014 17:20
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 johnynek/9415748 to your computer and use it in GitHub Desktop.
Save johnynek/9415748 to your computer and use it in GitHub Desktop.
// Find the newest asserted at for each combo of subject & property
.groupBy('subject, 'property) {
_.sortedReverseTake[(String, Double)](('asserted_at, 'value) -> 'items , 1)
}
// Extract out that newest asserted at value
.flatten[(String, Double)](('items) -> ('asserted_at, 'value))
.discard('items)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment