Agda-2.5.1: A dependently typed functional programming language and proof assistant
Agda.Utils.Memo
Synopsis
memo :: MonadState s m => Lens' (Maybe a) s -> m a -> m a Source
Simple, non-reentrant memoisation.
memoRec :: MonadState s m => Lens' (Maybe a) s -> a -> m a -> m a Source
Recursive memoisation, second argument is the value you get on recursive calls.