
16 Dec
2009
16 Dec
'09
4:47 a.m.
Hmm, you raise an On Dec 15, 2009, at 8:28 PM, Daniel Fischer wrote:
Am Mittwoch 16 Dezember 2009 05:08:39 schrieb Gregory Crosswhite:
Not even then, necessarily. And it's not always a good idea.
f k = [1 .. 20^k]
You raise a really good point here. One can force sharing, as I understand it, by using a let clause: n = let xs = f 20 in length (xs ++ xs) If I understand correctly, this should cause xs to be first evaluated, and then cached until the full length is computed, which in this case is obviously undesirable behavior. Cheers, Greg