Function std.range.tee
Implements a "tee" style pipe, wrapping an input range so that elements of the
  range can be passed to a provided function or OutputRange as they are
  iterated over. This is useful for printing out intermediate values in a long
  chain of range code, performing some operation with side-effects on each call
  to front or popFront, or diverting the elements of a range into an
  auxiliary OutputRange.
						
					
				It is important to note that as the resultant range is evaluated lazily,
  in the case of the version of tee that takes a function, the function
  will not actually be executed until the range is "walked" using functions
  that evaluate ranges, such as array or
  fold.
Parameters
| Name | Description | 
|---|---|
| pipeOnPop | If Yes, simply iterating the range without ever
  callingfrontis enough to haveteemirror elements tooutputRange(or,
  respectively,fun). Note that eachpopFront()call will mirror the
  oldfrontvalue, not the new one. This means that the last value will
  not be forwarded if the range isn't iterated until empty. IfNo, only elements for whichfrontdoes get called will be
  also sent tooutputRange/fun. Iffrontis called twice for the same
  element, it will still be sent only once. If this caching is undesired,
  consider usingmapinstead. | 
| inputRange | The input range being passed through. | 
| outputRange | This range will receive elements of inputRangeprogressively
  as iteration proceeds. | 
| fun | This function will be called with elements of inputRangeprogressively as iteration proceeds. | 
Returns
An input range that offers the elements of inputRange. Regardless of
  whether inputRange is a more powerful range (forward, bidirectional etc),
  the result is always an input range. Reading this causes inputRange to be
  iterated and returns its elements in turn. In addition, the same elements
  will be passed to outputRange or fun as well.
See Also
Example
import stdAuthors
Andrei Alexandrescu, David Simcha, Jonathan M Davis, and Jack Stouffer. Credit for some of the ideas in building this module goes to Leonardo Maffi.