memoWithArg
fun <TArg, TResult> memoWithArg(getDeps: (depArgs: TArg) -> List<Any?>, fn: (deps: List<Any?>) -> TResult, opts: MemoOptions<TResult>): (depArgs: TArg) -> TResult
Dependency-tracking memoiser with a thread-through argument.
Re-runs fn only when one of the dependencies returned by getDeps has changed by reference (!==) compared with the previous call. Dependencies are carried as List<Any?> and indexed inside fn; this trades the JS tuple-spread typing for a single list parameter that fits Kotlin's type system.
Returns a function of (TArg) -> TResult; pair with memo when no argument is needed.