Re: Why does compose from std.functional return a templated function

2020-09-16 Thread Simen Kjærås via Digitalmars-d-learn
On Wednesday, 16 September 2020 at 09:59:59 UTC, Jan Hönig wrote: I have toyed with the compose template in std.functional and ran into some problems. rikki_cattermole on discord helped me a lot to solve my problem. However, what still remains (for me) to understand is why. Source code for

Re: Why does compose from std.functional return a templated function

2020-09-16 Thread Daniel Kozak via Digitalmars-d-learn
On Wed, Sep 16, 2020 at 12:50 PM Daniel Kozak wrote: > > > On Wed, Sep 16, 2020 at 12:00 PM Jan Hönig via Digitalmars-d-learn < > digitalmars-d-learn@puremagic.com> wrote: > >> ... >> >> My main question is why? Is there something, which I am missing, >> that explains, why it is beneficial to

Re: Why does compose from std.functional return a templated function

2020-09-16 Thread Jan Hönig via Digitalmars-d-learn
On Wednesday, 16 September 2020 at 10:50:06 UTC, Daniel Kozak wrote: On Wed, Sep 16, 2020 at 12:00 PM Jan Hönig via Digitalmars-d-learn < digitalmars-d-learn@puremagic.com> wrote: ... My main question is why? Is there something, which I am missing, that explains, why it is beneficial to

Re: Why does compose from std.functional return a templated function

2020-09-16 Thread Daniel Kozak via Digitalmars-d-learn
On Wed, Sep 16, 2020 at 12:00 PM Jan Hönig via Digitalmars-d-learn < digitalmars-d-learn@puremagic.com> wrote: > ... > > My main question is why? Is there something, which I am missing, > that explains, why it is beneficial to return a templated > function? > > (maybe, because I might want to

Why does compose from std.functional return a templated function

2020-09-16 Thread Jan Hönig via Digitalmars-d-learn
I have toyed with the compose template in std.functional and ran into some problems. rikki_cattermole on discord helped me a lot to solve my problem. However, what still remains (for me) to understand is why. Source code for `compose`: