
27 May
2006
27 May
'06
5:12 p.m.
Brian Hulley wrote:
If I write:
do let n = newListArray a l p <- n q <- n
two separate arrays will be created, because n is the action of creating a new array, and this action is executed twice in the body of the do.
However, if I instead wrote:
do x <- newListArray a l let r = return x p <- r q <- r
I should have used the word "executed" instead of "write" and "wrote". Regards, Brian.