Skip to content

Instantly share code, notes, and snippets.

@ijuma
Created Apr 24, 2014
Embed
What would you like to do?
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