ireal-0.1: Real numbers and intervals with not so inefficient exact arithmetic.
Data.Number.IReal.UnsafeMemo
Synopsis
unsafeMemo :: Scalable a => (Int -> a) -> Int -> a Source
Memoizing a function which satisfies the property f (p-r) = scale (f p) (-r) for all r > 0. Unsafe; based on ideas from Lennart Augustsson's uglymemo.
f (p-r) = scale (f p) (-r)
r > 0
memoIO :: Scalable a => (Int -> a) -> IO (Int -> IO a) Source