
6 Sep
2007
6 Sep
'07
1:12 p.m.
Henning Thielemann wrote:
I'll see, if I understand it.
do writeArray arr 0 2 x <- readArray arr 0 writeArray arr 0 (x+x)
If 'arr' is an STArray, the 'arr' will contain the unevaluated expression "2+2" as zeroth element and with type STUArray it will contain the evaluated "4" ?
Exactly. Put differently, writeArray :: STUArray -> .. is strict in the third argument whereas writeArray :: STArray -> .. is not. Regards, apfelmus