Parameter Make.1-T
- 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 - iterargument to- Container.Makespecifies how to implement the container's- iterfunction.- `Define_using_foldmeans to define- itervia:- iter t ~f = Container.iter ~fold t ~f- `Customoverrides the default implementation, presumably with something more efficient. Several other functions returned by- Container.Makeare defined in terms of- iter, so passing in a more efficient- iterwill improve their efficiency as well.
- val length : [ `Define_using_fold | `Custom of 'a t -> int ]
- The - lengthargument to- Container.Makespecifies how to implement the container's- lengthfunction.- `Define_using_foldmeans to define- lengthvia:- length t ~f = Container.length ~fold t ~f- `Customoverrides the default implementation, presumably with something more efficient. Several other functions returned by- Container.Makeare defined in terms of- length, so passing in a more efficient- lengthwill improve their efficiency as well.