Revive pull request #1348: "Issue 9882 - Implement a "tee" style InputRange...

...so that a function can be called during a chain of InputRanges."
It was used by the original pull author, and I didn't see any reason to change it.