7 ms·
That's called memoization and you usually want to leave this decision up to the caller and not the callee since only the caller knows if they are fine with rece
by zak_mc_kracken 12y ago
That's called memoization and you usually want to leave this decision up to the caller and not the callee since only the caller knows if they are fine with receiving the same value as calculated previously or whether they want a new one each time.
- louthy 12y agoOnly relevant if the function isn't pure.