To Stream.slice(fromInclusive, toExclusive) or Stream.slice(toSkip, limit) that is the question
paul.sandoz at oracle.com
Fri Oct 11 05:13:11 PDT 2013
On Oct 11, 2013, at 11:52 AM, Joe Bowbeer <joe.bowbeer at gmail.com> wrote:
> slice notation in groovy is also start..end, and slice notation in scala and clojure is start:end.
> Those are all the languages I know that have a slice. In what language is a slice parameterized by start:count?
Although that is on a vector and AFAICT not some generic traversable thing.
But point taken; there are other languages that take the absolute approach.
> On Oct 11, 2013 1:12 AM, "Paul Sandoz" <paul.sandoz at oracle.com> wrote:
> Hi Joe,
> I tend to think of slice(s, l) as the fused (optimal) form of skip(s).limit(l). For parallel streams the the fused form will result in less wrapping and/or buffering (depending on the properties of the input stream). Documentation-wise we should probably include an api note on skip and limit referring to slice in this respect.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the lambda-libs-spec-experts