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

...so that a function can be called during a chain of InputRanges."
I'm not sure I understand what `is(typeof(fun)==void)` means -- is that intended to check for arguments that are template names? Is there some kind of convention I'm not aware of, where if an alias is void, then we should try instantiating it with a template argument instead? Not saying that this code is necessarily wrong, but it's just not clear (to me) what its intent is or what the assumptions are.
Or am I missing something obvious?