
21 Jul
2011
21 Jul
'11
4:30 a.m.
On Wed, 20 Jul 2011 12:48:48 -0300
Thiago Negri
Is it possible to implement (==) that first check these thunks before evaluating it? (Considering both arguments has pure types).
E.g.,
Equivalent thunks, evaluates to True, does not need to evaluate its arguments: [1..] == [1..]
Thunks are just expressions and equality of expressions is undecidable in any Turing-complete language (like any general-purpose programming language). Note that syntactical equality is not sufficient because (==) should be referentially transparent. Pedro