Дмитрий Рыбас on Mon, 15 Jul 2019 09:24:46 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: Using local variable for memoizing in recursion |
You can use local(): p(n,k)= { local(M=Map()); memo_p(n,k); }Using local() is partial solution: one has to use the same (shared) name of variable in both calling and called functions. Is it possible to declare local variable in function a() and somehow pass it's name (or other reference) to function b() ?