[Haskell-beginners] Pattern matching over functions

Ken KAWAMOTO kentaro.kawamoto at gmail.com
Sat Dec 10 17:17:57 CET 2011


On Thu, Dec 8, 2011 at 3:14 PM, Brent Yorgey <byorgey at seas.upenn.edu> wrote:
> On Wed, Dec 07, 2011 at 06:10:01PM +0100, Giacomo Tesio wrote:
>> I would find already very useful a compiler that is able to understand id f
>> = f, that (\x -> 3 + x) == (\y = 3 + y) == (+3) even if it isn't able to
>> see that (+3) == (\x -> 2 + 1 + x).
>
> But then we would lose referential transparency.

As I understand, this would be against lazy evaluation since it would
request to evaluate expressions in lambda, but I don't see how this
relates to referential transparency.
Can you elaborate this a little bit?

Thanks,
Ken



More information about the Beginners mailing list