Re: Transmitting parameters
At 2001-11-01 22:10, raul sierra alcocer wrote:
What mechanism of transmiting parameters does Haskell implement?
By value. -- Ashley Yakeley, Seattle WA
At 2001-11-01 22:10, raul sierra alcocer wrote:
What mechanism of transmiting parameters does Haskell implement?
By value.
Yes, though one might equally say that they are passed by reference, since in g = let f x = x+x z = factorial 1000 in f z * z the 'first' instance of x forces z to be evaluated and updated, the second instance of x uses this updated value, and so does the final occurrence of z. -- Jón Fairbairn Jon.Fairbairn@cl.cam.ac.uk 31 Chalmers Road jf@cl.cam.ac.uk Cambridge CB1 3SZ +44 1223 570179 (after 14:00 only, please!)
participants (2)
-
Ashley Yakeley -
Jon Fairbairn