Skip to content

Instantly share code, notes, and snippets.

@ijuma
Created April 24, 2014 17:04
Show Gist options
  • Save ijuma/11261906 to your computer and use it in GitHub Desktop.
Save ijuma/11261906 to your computer and use it in GitHub Desktop.
println("head: " + events.sortBy(d => d.importedAt.desc).map(_.importedAt).run.head)
println("firstOption: " + events.sortBy(d => d.importedAt.desc).map(_.importedAt).first)
println("run: " + events.map(_.importedAt).sortBy(_.desc).take(1).first)
Output in 2.1.0-M1:
head: 1394563161061
firstOption: 1394116251466
run: 1394563161061
In 2.0.1, all of them print "1394563161061"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment