lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


To those giving URLs, thank you all! :-)
Have not read all messages yet, but I appreciate the help.

David Jones a écrit :
Memoise is a higher-order function.  [...]

There is an example of this technique in the test/fib.lua script provided in the standard lua distribution (called "cache" in that file).

Yes, that reminds of cache, and somebody recently shown me this optimization for Fibonacci. That's smart. Memory is cheap, these days.
Thanks for the reminder.

As it happens they use the languages ML and Scheme, but I think that's an irrelevance. Don't be afraid to learn a new language. SICP is one of my favourite books and is online:: http://mitpress.mit.edu/sicp/

Not afraid for new languages, I love to learn them. Just lacking of time.

Thank you.

--
Philippe Lhoste
--  (near) Paris -- France
--  http://Phi.Lho.free.fr
--  --  --  --  --  --  --  --  --  --  --  --  --  --