package jenga

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

find_or_add t ~unique_id_across_jenga:typ ~unique_f_across_jenga:f computes f (paths t), making sure f is only called once per t. Values for typ and f must be the same for every call of find_or_add for a given t. In particular in the current implementation, passing different ids will raise but passing different functions will probably give you incorrect results.

Note that paths t is shallow, that is it ignores subgroups of t.

val find_or_add : t -> unique_id_across_jenga:'a Core.Type_equal.Id.t -> unique_f_across_jenga:(Path.t list -> 'a) -> 'a

find_or_add t ~unique_id_across_jenga:typ ~unique_f_across_jenga:f computes f (paths t), making sure f is only called once per t. Values for typ and f must be the same for every call of find_or_add for a given t. In particular in the current implementation, passing different ids will raise but passing different functions will probably give you incorrect results.

Note that paths t is shallow, that is it ignores subgroups of t.

OCaml

Innovation. Community. Security.