> > memoise :: (Ix a) => (a,a) -> (a -> b) -> a -> b > > memoise bds f = (!) arr > > where arr = array bds [ (t,f t) | t <- range bds ] > when using the the memoisation function for caching functions the cache is very forgetful. But making the cache array a CAF brings memoisation to work. Is this really necesarry ? Klemens
- Re: memoisation function Klemens Hemm
- Re: memoisation function Patrick Sansom
