
31 Jan
2007
31 Jan
'07
3:49 p.m.
Kirsten Chevalier wrote:
On Wed, 2007-01-31 at 19:51 +1100, Donald Bruce Stewart wrote: . . .
foldl (\water dish -> wash water dish) soapywater dishes ::
[Dishes]
Nice example. First, note that you can't get close with map -- you need accumulation across the dishes. [...] It also assumes that there's necessarily a natural decomposition on
On 1/31/07, Bill Wood
wrote: the dishes, and if you think there is, you haven't seen my kitchen!
Using a lazy fold may not be the best choice. Although it may sound enticing to delay washing until a clean dish is actually required (and having the dirty dishes removed by the garbage collector, hopefully before they start naturally decomposing), you will quickly run out of stack space. -k