On Sunday, 16 May 2021 at 12:54:19 UTC, Chris Piker wrote:
...

If all you need is a single type for the parameter(s) and return type, then it can be simplified a bit to save you some typing:

```d
struct S(T)
{
   alias FT = T function(T);
   FT func;
}

void main()
{
    auto a = S!int(a => a*2);
    auto b = S!int(a => a+2);
    a = b;
}
```


Reply via email to