A pass() identity range?

H. S. Teoh hsteoh at quickfur.ath.cx
Wed Jan 2 09:45:51 PST 2013


On Mon, Dec 24, 2012 at 02:35:29PM +0100, monarch_dodra wrote:
> On Saturday, 22 December 2012 at 21:21:21 UTC, Ali Çehreli wrote:
> >On 12/22/2012 12:55 AM, bearophile wrote:
> >
> >> To help writing/improving/debugging such code maybe it's
> >> useful to create a pass() range in Phobos.
> >
> >I liked the idea yesterday but I thought that the name was a
> >little off.
> 
> Ditto.
> 
> >How about a name like tap()? We tap into data as it's flowing
> >through?
> 
> Niiice. I like it.

This response is a year late ;-) but I thought tee() might be a better
name. It has a precedent in the Unix tee command, which copies stdin
into a file and also passes it along to stdout, quite similar to what is
being done here (except that instead of a file it's a
delegate/function).


T

-- 
To err is human; to forgive is not our policy. -- Samuel Adler


More information about the Digitalmars-d-learn mailing list