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