hinze-streams-1.0: Streams and Unique Fixed Points

Data.Stream.Hinze.Memo

Synopsis

Documentation

class Memo k t whereSource

We could add functional dependencies |k -> t| and |t -> k|, but since Haskell has a nominal type system there may be several isomorphic key types that relate to the same table type (or vice versa).

Methods

tabulate :: (k -> a) -> t aSource

lookup :: t a -> k -> aSource

dom :: t kSource

Instances

Integral a => Memo a Stream

Streams of type 'Stream a' are memoised functions of type 'Natural -> A|'