[Haskell-cafe] How to check object's identity?

Luke Palmer lrpalmer at gmail.com
Sat Jan 3 20:46:50 EST 2009


2009/1/3 Xie Hanjian <jan.h.xie at gmail.com>

> Hi,
>
> I tried this in ghci:
> >Prelude> 1:2:[] == 1:2:[]
> True
>
> Does this mean (:) return the same object on same input,


Also, in functional programming, *every* function returns the same output
for the same input.  That's part of the definition of function.  :-)

Luke
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20090103/794510eb/attachment.htm


More information about the Haskell-Cafe mailing list