package core_extended

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
include module type of struct include Core.Memo end
val general : ?hashable:'a Core_kernel__.Hashtbl.Hashable.t -> ?cache_size_bound:Base.Int.t -> ('a -> 'b) -> 'a -> 'b

Returns a memoized version of any function with a single argument. The default caching policy is to remember everything for the lifetime of the returned closure, but one may specify an upper bound on cache size. Whenever a cache entry must be forgotten in order to obey this bound, we pick the least-recently-used one.

Raises an exception if cache_size_bound is negative or zero.

val unit : (Base.Unit.t -> 'a) -> Base.Unit.t -> 'a

efficient special case for argument type unit

include module type of struct include Extended_memo end
val general_rec : (('a -> 'b) -> 'a -> 'b) -> 'a -> 'b

A version of Memo.general more suitable for memoizing recursively-defined functions

val reentrant_unit : (unit -> 'a) -> unit -> 'a
OCaml

Innovation. Community. Security.