Parameter Make.1-T
val length : [ `Define_using_fold | `Custom of 'a t -> int ]The
lengthargument toContainer.Makespecifies how to implement the container'slengthfunction.`Define_using_foldmeans to definelengthvia:length t ~f = Container.length ~fold t ~f`Customoverrides the default implementation, presumably with something more efficient. Several other functions returned byContainer.Makeare defined in terms oflength, so passing in a more efficientlengthwill improve their efficiency as well.
val iter : [ `Define_using_fold | `Custom of 'a t -> f:('a Base.Monad.Ident.t -> unit) -> unit ]The
iterargument toContainer.Makespecifies how to implement the container'siterfunction.`Define_using_foldmeans to defineitervia:iter t ~f = Container.iter ~fold t ~f`Customoverrides the default implementation, presumably with something more efficient. Several other functions returned byContainer.Makeare defined in terms ofiter, so passing in a more efficientiterwill improve their efficiency as well.
val fold : 'a t -> init:'accum -> f:('accum -> 'a Base.Monad.Ident.t -> 'accum) -> 'accum