optional process
Taylor Hillegeist
taylorh140 at gmail.com
Thu Dec 5 17:27:45 UTC 2019
On Thursday, 5 December 2019 at 15:43:30 UTC, Paul Backus wrote:
> On Thursday, 5 December 2019 at 15:30:52 UTC, Taylor Hillegeist
> wrote:
>> On Friday, 29 November 2019 at 15:24:31 UTC, Paul Backus wrote:
>>
>>> .pipe!((output) {
>>> if (sortOutput)
>>> return output.sort!("a < b");
>>> else
>>> return output;
>>> })
>>> .writeln(); // maybe you meant each!writeln ?
> range
> .someFunction
> .each!writeln;
>
> So why use pipe? Because in this case, the function we want to
> apply is a lambda, and you can't call lambdas with UFCS.
I agree with this.
I wasn't clear enough in my question though.
I was trying to distinguish between std.functional.compose and
std.functional.pipe
they look very the same. Pipe says it reverses functions order.
Which makes no sense to me.
More information about the Digitalmars-d-learn
mailing list