[Haskell-cafe] pointer equality

Nikhil A. Patil patil.nikhil at gmail.com
Wed Jul 20 05:51:13 CEST 2011


Hi,

Is there any way of getting the following code to immediately return
True without performing the element-by-element comparison? Essentially
this boils down to checking whether pointers are equal before
comparing the contents.

> main = print $ f == f
>     where f = [1..10^9]

Thanks!!

nikhil



More information about the Haskell-Cafe mailing list