News for hackers. Stuff that matters.
Re:Understanding Monoids using F# by MrBuddyCasino on Thursday March 05, 2015 @05:48AM (#9150033)
The introduction of stream processing in Java 8 is a concrete example - it can auto-parallelize computations. It was not immediately clear to me why an identity value was needed in this function:

    http://docs.oracle.com/javase/8/docs/api/java/util/stream/Stream.html#reduce-T-java.util.function.BinaryOperator-
After reading up on monoids, it became clear. Note how the reduce() variant that does not take an identity value is allowed to return null!

There are no comments on this comment yet.