Recommendations on avoiding range pipeline type hell
SealabJaster
sealabjaster at gmail.com
Sun May 16 20:32:08 UTC 2021
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;
}
```
More information about the Digitalmars-d-learn
mailing list