-- 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?]