memoize

fun <Result> memoize(f: () -> Result): () -> Result
fun <Input, Result> memoize(f: (Input) -> Result): (Input) -> Result
fun <Result> memoize(validFor: Duration, f: () -> Result): () -> Result
fun <Input, Result> memoize(validFor: Duration, f: (Input) -> Result): (Input) -> Result
fun <Input1, Input2, Result> memoize(validFor: Duration, f: (Input1, Input2) -> Result): (Input1, Input2) -> Result