taylorh140 at gmail.com
Fri Dec 6 05:16:09 UTC 2019
On Friday, 6 December 2019 at 05:09:58 UTC, Paul Backus wrote:
> On Thursday, 5 December 2019 at 17:27:45 UTC, Taylor Hillegeist
>> I agree with this.
>> I wasn't clear enough in my question though.
>> I was trying to distinguish between std.functional.compose and
>> they look very the same. Pipe says it reverses functions
>> order. Which makes no sense to me.
> input.pipe!(f, g, h) == input.f.g.h == h(g(f(input)))
> input.compose!(f, g, h) == input.h.g.f == f(g(h(input)))
This is surprisingly clear. I guess I never thought to put
multiple functions into pipe that way. It also makes sense why
pipe would be the default choice.
Thank you, Paul, for the great answer.
More information about the Digitalmars-d-learn