Data.MemoUgly

uglymemo-0.1.0.1: A simple (but internally ugly) memoization function.

Safe Haskell | None
Language | Haskell98

Data.MemoUgly

Synopsis

- memoIO :: Ord a => (a -> b) -> IO (a -> IO b)
- memo :: Ord a => (a -> b) -> a -> b

# Documentation

memoIO #

Arguments

:: Ord a |
=> (a -> b) | Function to memoize
-> IO (a -> IO b) |

Memoize the given function by allocating a memo table, and then updating the memo table on each function call.

memo #

Arguments

:: Ord a |
=> (a -> b) | Function to memoize
-> a |
-> b |

The pure version of `memoIO`.