[Haskell-beginners] Pattern matching over functions

Felipe Almeida Lessa felipe.lessa at gmail.com
Sun Dec 11 19:26:16 CET 2011


On Sun, Dec 11, 2011 at 4:07 PM, Graham Gill <math.simplex at gmail.com> wrote:
> I second the question. From what I understand referential transparency means
> that an expression can be replaced by its value with no change to program
> semantics, or equivalently that a function always produces the same
> result/behaviour given the same input. How does determining whether two
> (pure) functions are equivalent break referential transparency?

It doesn't.  Whoever it also isn't guaranteed to terminate.

What *does* break referential transparency is a function equality that
works sometimes, but not other.

Cheers,

-- 
Felipe.



More information about the Beginners mailing list