Re: Has anyone experimented with memo functions in LC?

2011-06-16 Thread Geoff Canyon Rev
This would work for a particular function. I was looking for a general solution that would allow memo-ing any function without further consideration. In J, for example, you just and M. to the function definition, and you're done. If I were to do something like this in LC I'd want to implement

Re: Has anyone experimented with memo functions in LC?

2011-06-16 Thread Dick Kriesel
So there, for the rumor mill, is another feature of the CanyonLands pre-compiler ... Actually, the memoize function below would work for just about all functions where you'd ever want memoizing (barring polymorphism and array parameters). It would work even in a stack-in-use or a back script.

Re: Has anyone experimented with memo functions in LC?

2011-06-14 Thread Dick Kriesel
Hi, Geoff. Here's a way to memoize without parsing the functions' arguments, so commas won't be a pain. local sMemo function memoize pFunctionName, pParam1, pParam2 local tDigest put md5( the params ) into tDigest if tDigest is among the keys of sMemo then get sMemo[ tDigest ]

Re: Has anyone experimented with memo functions in LC?

2011-06-11 Thread Jim Ault
On Jun 11, 2011, at 2:23 PM, Geoff Canyon Rev wrote: http://en.wikipedia.org/wiki/Memoization I'm wondering if anyone has experimented with creating an automatic memoization function within LC? Given that we can access argument lists, and have do, it seems possible, but I'm betting commas in