New answers tagged

2

The solution is to put the function inputs into a canonical form, suitable for use with a cache. For example: Options[f] = { "a" -> 1, "b" -> 2} f[x_, OptionsPattern[]] := Module[{a = OptionValue["a"], b = OptionValue["b"]}, internalF[{x, a, b}] ] internalF[{x_, a_, b_}] := internalF[{x, a, b}] = .....


Top 50 recent answers are included