Function Composition

atzensepp webwicht at web.de
Wed Jan 31 20:19:35 UTC 2024


On Monday, 29 January 2024 at 19:24:51 UTC, Inkrementator wrote:
> On Thursday, 25 January 2024 at 18:44:26 UTC, atzensepp wrote:
>> However this works:
>> ```d
>>   int delegate (int) td = (x) => 
>> compose!(f,g,g,f,g,g,f,g,g,f)(x);
>>
>> ```
>
> While not a real function pointer, this might already fit your 
> needs.
>
> ```d
> alias td = compose!(f,g);
> ```

Dear Inkrementator,
thank you very much for this recommendation!
This is an effective way to make functions and delegates 
compatible.


More information about the Digitalmars-d-learn mailing list