tee()
    Paul Sandoz 
    paul.sandoz at oracle.com
       
    Fri Jan 25 00:44:48 PST 2013
    
    
  
On Jan 25, 2013, at 2:11 AM, 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; })...
> 
Although map affects the properties downstream in ways that tee/peek (observe?) does not. 
If the upstream is known to be sorted and/or distinct then the map operation will clear those properties so the downstream is not known to be sorted and/or distinct.
Paul.
    
    
More information about the lambda-libs-spec-experts
mailing list