News for hackers. Stuff that matters.
Re:Java 8: No more loops by codygman on Tuesday January 13, 2015 @12:00AM (#8878242)
formatted Scala code by hibikir from above in thread[0]:

    def topJavaArticle(articles:List[Article]) = articles.find(_.tags.contains("Java"))

    def javaArticles(articles:List[Article]) = articles.filter(_.tags.contains("Java"))

    def byAuthor(articles:List[Article) = articles.groupBy(_.author)
0: https://news.ycombinator.com/item?id=8874785

There are no comments on this comment yet.