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.

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to