
17 Feb
2011
17 Feb
'11
8:25 p.m.
Excerpts from Johan Tibell's message of Thu Feb 17 19:51:28 -0500 2011:
I'd like to see some arguments for and against each of the two possible defaults (lazy or strict). Also, real life examples of cases where lazy maps are useful would be appreciated.
My favorite example of lazy maps being useful is the case of dynamic programming, where the particular value you are attempting to compute only uses a small subset of the true "table". You can then actually write out the map (which refers to itself) and "initialize" it with all values, but not actually calculate all of them. Less efficient in some cases? Probably. But it's hella elegant. Cheers, Edward