Skip to content

Instantly share code, notes, and snippets.

@ThomasAlexandre
Created February 20, 2012 12:30
Show Gist options
  • Save ThomasAlexandre/1869005 to your computer and use it in GitHub Desktop.
Save ThomasAlexandre/1869005 to your computer and use it in GitHub Desktop.
JFokus 2012 Summary of "Scala One-liners" talk
case class Deal(title:String="",disc:Int=0,city:String="")
val r = url("http://localhost:8086")
(for{x<-Http(r<>{_\"deal"});d=(x\"disc").text.toInt if d>20}yield Deal((x\"title").text,d,(x\"city").text))groupBy(_.city)mapValues(_.size)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment