package logtk

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Parameters

module X : HASH
module Y : HASH

Signature

type 'a t
type key1 = X.t
type key2 = Y.t
val create : int -> 'a t

Create a new cache of the given size.

val clear : 'a t -> unit

Clear content of the cache

val with_cache : 'a t -> (key1 -> key2 -> 'a) -> key1 -> key2 -> 'a

Wrap the function with the cache

type 'a func = key1 -> key2 -> 'a
val with_cache_rec : 'a t -> ('a func -> 'a func) -> 'a func

Partially apply the given function with a cached version of itself. It returns the specialized function.

OCaml

Innovation. Community. Security.