package fix

  1. Overview
  2. Docs

This module offers facilities for constructing a (possibly recursive) memoized function, that is, a function that lazily records its input/output graph, so as to avoid repeated computation.

module Make (M : sig ... end) : sig ... end

Make constructs a memoizer for a type key that is equipped with an implementation of imperative maps.

module ForOrderedType (T : Map.OrderedType) : sig ... end

ForOrderedType is a special case of Make where it suffices to pass an ordered type T as an argument. A reference to a persistent map is used to hold the memoization table.

module ForHashedType (T : Hashtbl.HashedType) : sig ... end

ForHashedType is a special case of Make where it suffices to pass a hashed type T as an argument. A hash table is used to hold the memoization table.

module ForType (T : sig ... end) : sig ... end

ForType is a special case of Make where it suffices to pass an arbitrary type T as an argument. A hash table is used to hold the memoization table. OCaml's built-in generic equality and hash functions are used.

module Char : sig ... end

A memoizer for the type char.

module Int : sig ... end

A memoizer for the type int.

module String : sig ... end

A memoizer for the type string.

OCaml

Innovation. Community. Security.