memo2<A, B, R> function
R Function(A, B)
memo2<A, B, R>(
- R f(
- A,
- B
memo-ize the given function, caching the return result.
Implementation
R Function(A, B) memo2<A, B, R>(R Function(A, B) f) {
final mf = memo1((A a) => memo1((B b) => f(a, b)));
return (A a, B b) => mf(a)(b);
}