On Wednesday, 8 April 2015 at 17:43:27 UTC, Dicebot wrote:
On Wednesday, 8 April 2015 at 17:41:01 UTC, ixid wrote:
Even putting aside the formal definition of output range, output is NOT part of the pipeline! Pipelines can be composed and they keep pumping data through them. writeln does not transform its input nor does it forward it to the next item in the pipe. It just eats it.

"nor does it forward it to the next item in the pipe"

This is something I think writeln should do and have suggested before. It would be useful for debugging pipelines to be able to drop in writeln in the middle of the pipeline and pass on the data unchanged.

http://dlang.org/library/std/range/tee.html ?

Thanks, I wasn't aware of that function. Will use that.

Reply via email to