Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Strymonas – A library for OCaml and Scala for fast, bulk, in-memory processing.
def filterFilterTest (xs : Rep[Array[Int]]) : Rep[Int] = Stream[Int](xs) .filter(d => d % 2 == 0) .filter(d => d % 3 == 0) .fold(unit(0), ((a : Rep[Int]) => (b : Rep[Int]) => a + b))
xs.filter(d => d % 2 == 0).filter(d => d % 3 == 0).fold(0)(_+_)
They both look pretty much the same and superficially do the same thing too, so what makes this new thing better/novel?
They both look pretty much the same and superficially do the same thing too, so what makes this new thing better/novel?