On Thursday, 18 October 2018 at 14:08:11 UTC, aliak wrote:
On Wednesday, 17 October 2018 at 23:34:55 UTC, Paul Backus wrote:

auto x = () {
    // do some heavy stuff

if (condition) {
    func(x().y); // heavy stuff evaluated here

That would do heavy stuff everytime i wanted to get y though right?

Yes. If that's a problem, you could use `std.functional.memoize`, or Ali's solution.

Reply via email to