in reply to Efficiency and Functions in loops

Hi Superlman,

I think the memoize module does what you want.
Check out the documentation at memoize

cheers

thinker.