Y in Practical Programs (Extended Abstract)
citeseerx.ist.psu.edu
citeseerx.ist.psu.edu
-- General implementation
type T = Int -> Set [Int]
g :: T -> T
...
g' = fix g -- Very slow
g'' = memoFix integral g -- Fast, Generic
g''' = memoFix integer g -- Fast enough to use
On a side note, the paper seems too readable to me! Usually these kinds of topics are presented in such a way as to make them almost completely incomprehensible. Something must be very wrong here.
[edit: How do you quote code?]
Double indent with spaces
I always figured that the Y combinator was mostly theoretical, when I came across a little javascript memoization demo using the Y combinator a while ago I changed my mind on that.
Very interesting stuff this, especially because it seems to have some really neat side effects (pun intended), such as making some of the most naive code run in linear time.