Well, it's clearly a design choice. But in general laziness does not come for free. The choice made by the Haskell designers was that the 'array' function can consume and explore all its input before producing any result. It just give more scope to the implementor. Nothing too deep. Simon | -----Original Message----- | From: Johannes Waldmann [mailto:joe@isun.informatik.uni-leipzig.de] | Sent: 12 November 2001 20:29 | To: haskell@haskell.org | Subject: how strict is Array.array? | | | I was surprised to note that | | bounds $ array (0,1) undefined | | is undefined ( rather than (0,1) ) - why is this? | | just curious, | -- | -- Johannes Waldmann ---- | http://www.informatik.uni-leipzig.de/~joe/ -- | -- | joe@informatik.uni-leipzig.de -- phone/fax (+49) 341 9732 204/252 -- | | _______________________________________________ | Haskell mailing list | Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell |
participants (1)
-
Simon Peyton-Jones