memo3<A, B, C, R> function

R Function(A, B, C) memo3<A, B, C, R>(
  1. R f(
    1. A,
    2. B,
    3. C
    )
)

memo-ize the given function, caching the return result.

Implementation

R Function(A, B, C) memo3<A, B, C, R>(R Function(A, B, C) f) {
  final mf = memo1((A a) => memo1((B b) => memo1((C c) => f(a, b, c))));
  return (A a, B b, C c) => mf(a)(b)(c);
}