Are there any sane analogues to LINQ (.NET) exists for Scala?
There are many situations in Scala where you can use monadic constructs as a sort of query language.
For example, to query XML (in this case, extracting URLs from links in some XHTML):
def findURLs(xml: NodeSeq): Seq[URL] =
for {
a <- xml \\ "a"
href <- a attribute "href"
url <- href.text
} yield URL(url)
For an analogue of LINQ to SQL, the closest thing is probably ScalaQuery. To lift an example right out of the docs:
val q4c = for {
u <- Users
o <- Orders if o.userID is u.id
} yield u.first ~ o.orderID