On Tuesday, 29 January 2019 at 15:26:13 UTC, Daniel Kozak wrote:
> Maybe https://dlang.org/phobos/std_functional.html#memoize
> should helped you
No, this does not compile:
struct C {
int _f() { writeln("Got!"); return 2; }
alias f = memoize!_f;
}