3 ms·
Haskell is lazy, but the compiler can be smart enough to know that 2+3 is semantically equal to 5 in it's model of computation. This is without violating the la
by hvidgaard 11y ago
Haskell is lazy, but the compiler can be smart enough to know that 2+3 is semantically equal to 5 in it's model of computation. This is without violating the lazy nature of the language. So it can (and will I believe, but I haven't checked) fold any such expressions to their constant value when compiling for performance reasons.