On Monday, 15 January 2018 at 02:54:16 UTC, Marc wrote:
let's assume I have
class C {
static string foo() { writeln("got called!"); // }
}
then I want to cache foo at some point:
import std.algorithm;
auto v = cache(c.foo);
That doesn't do what I think you think it does.
http://dpl
let's assume I have
class C {
static string foo() { writeln("got called!"); // }
}
then I want to cache foo at some point:
import std.algorithm;
auto v = cache(c.foo);
I call do:
for(int i = 0; i <10; i++) {
writeln(v);
}
then it'll print "got called" only once, which is what I