Parameter Make.1-T
include Base__.Container_intf.Make_arg
val fold : 'a t -> init:'accum -> f:('accum -> 'a elt -> 'accum) -> 'accum
val iter : [ `Define_using_fold | `Custom of 'a t -> f:('a elt -> unit) -> unit ]
The
iter
argument toContainer.Make
specifies how to implement the container'siter
function.`Define_using_fold
means to defineiter
via:iter t ~f = Container.iter ~fold t ~f
`Custom
overrides the default implementation, presumably with something more efficient. Several other functions returned byContainer.Make
are defined in terms ofiter
, so passing in a more efficientiter
will improve their efficiency as well.
val length : [ `Define_using_fold | `Custom of 'a t -> int ]
The
length
argument toContainer.Make
specifies how to implement the container'slength
function.`Define_using_fold
means to definelength
via:length t ~f = Container.length ~fold t ~f
`Custom
overrides the default implementation, presumably with something more efficient. Several other functions returned byContainer.Make
are defined in terms oflength
, so passing in a more efficientlength
will improve their efficiency as well.
val iteri : [ `Define_using_fold | `Custom of ('a t, 'a) Base__.Indexed_container_intf.iteri ]
val foldi : [ `Define_using_fold | `Custom of ('a t, 'a, _) Base__.Indexed_container_intf.foldi ]