Skip to content

Collections design issues

Jonathan Aldrich edited this page Feb 23, 2019 · 1 revision

Consider implementing in a unified stream/collection framework

  • want side-effect-free operations for the lazy/infinite version
    • lazy/infinite stream version doesn't have size(), reduce(), etc.

Consider adding contains, get, find to type Collection

Consider a mutable "collect" operation similar to Java's

  • also variants of reduce, e.g. with no identity value but returning an option, or a parallelizable version that takes an identity, an accumulator, and a combiner