memoize

fun <O> () -> O.memoize(): () -> O
fun <I1, O> (I1) -> O.memoize(): (I1) -> O
fun <I1, I2, O> (I1, I2) -> O.memoize(): (I1, I2) -> O
fun <I1, I2, I3, O> (I1, I2, I3) -> O.memoize(): (I1, I2, I3) -> O
fun <I1, I2, I3, I4, O> (I1, I2, I3, I4) -> O.memoize(): (I1, I2, I3, I4) -> O
fun <I1, I2, I3, I4, I5, O> (I1, I2, I3, I4, I5) -> O.memoize(): (I1, I2, I3, I4, I5) -> O
fun <I1, I2, I3, I4, I5, I6, O> (I1, I2, I3, I4, I5, I6) -> O.memoize(): (I1, I2, I3, I4, I5, I6) -> O

Returns a locally-memoized version of this function. Two separate invocations of memoize will have two separate caches.