tee()
Howard Lovatt
howard.lovatt at gmail.com
Wed Jan 30 12:27:30 PST 2013
In my own stream library I have a toString method that forces evaluation. For debugging I use the equivalent of (neglecting generics):
Stream s = collection.stream();
Stream f = s.filter( ... );
Stream r = f.reduce( ... );
Then when debugging I step over each line and examine the intermediate stages (usually by hovering over the variable which causes my non-lazy toString to be called).
Not ideal, but the best I have come up with and no need for tee().
-- Howard Lovatt +61 419 971 263 (sent from my PDA)
On 25/01/2013, at 12:11 PM, Doug Lea <dl at cs.oswego.edu> wrote:
> On 01/24/13 20:00, Joe Bowbeer wrote:
>> I'm OK with peek() even though it has other meanings on IO streams.
>>
>> Is the name leak() is more to your liking?
>
> I can't think of a good name for the the little idiom of
> ....map(x -> { use(x); return x; })...
>
> Which seems more like an IDE thing than an API thing anyway.
>
> But then again, I don't like practically all of the
> convenience methods, so discount my vote accordingly.
>
> -Doug
>
>
>
>>
>> Joe
>>
>>
>> On Thu, Jan 24, 2013 at 4:47 PM, Doug Lea <dl at cs.oswego.edu
>> <mailto:dl at cs.oswego.edu>> wrote:
>>
>> On 01/24/13 15:43, Kevin Bourrillion wrote:
>>
>> If it really must stay, I think I do like "peek" or "observe" over
>> "tee". But I
>> would love to drop it.
>>
>>
>> In case it is not too late to vote to drop this, I vote to drop it.
>> And if too late, I vote to name it something other than any of these.
>>
>> -Doug
>
More information about the lambda-libs-spec-observers
mailing list