ireal-0.1: Real numbers and intervals with not so inefficient exact arithmetic.

Safe HaskellNone
LanguageHaskell98

Data.Number.IReal.UnsafeMemo

Synopsis

Documentation

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.

memoIO :: Scalable a => (Int -> a) -> IO (Int -> IO a) Source