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
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe