sig
type 'a monoid = { zero : 'a; combine : 'a -> 'a -> 'a; }
exception Empty
module type S =
sig
type ('a, 'm) fg
type ('wrapped_type, 'a, 'm) wrap
val empty : ('a, 'm) BatFingerTree.S.fg
val singleton : 'a -> ('a, 'm) BatFingerTree.S.fg
val cons :
(('a, 'm) BatFingerTree.S.fg -> 'a -> ('a, 'm) BatFingerTree.S.fg,
'a, 'm)
BatFingerTree.S.wrap
val snoc :
(('a, 'm) BatFingerTree.S.fg -> 'a -> ('a, 'm) BatFingerTree.S.fg,
'a, 'm)
BatFingerTree.S.wrap
val front :
(('a, 'm) BatFingerTree.S.fg ->
(('a, 'm) BatFingerTree.S.fg * 'a) option, 'a, 'm)
BatFingerTree.S.wrap
val front_exn :
(('a, 'm) BatFingerTree.S.fg -> ('a, 'm) BatFingerTree.S.fg * 'a, 'a,
'm)
BatFingerTree.S.wrap
val head : ('a, 'm) BatFingerTree.S.fg -> 'a option
val head_exn : ('a, 'm) BatFingerTree.S.fg -> 'a
val last : ('a, 'm) BatFingerTree.S.fg -> 'a option
val last_exn : ('a, 'm) BatFingerTree.S.fg -> 'a
val tail :
(('a, 'm) BatFingerTree.S.fg -> ('a, 'm) BatFingerTree.S.fg option,
'a, 'm)
BatFingerTree.S.wrap
val tail_exn :
(('a, 'm) BatFingerTree.S.fg -> ('a, 'm) BatFingerTree.S.fg, 'a, 'm)
BatFingerTree.S.wrap
val init :
(('a, 'm) BatFingerTree.S.fg -> ('a, 'm) BatFingerTree.S.fg option,
'a, 'm)
BatFingerTree.S.wrap
val init_exn :
(('a, 'm) BatFingerTree.S.fg -> ('a, 'm) BatFingerTree.S.fg, 'a, 'm)
BatFingerTree.S.wrap
val rear :
(('a, 'm) BatFingerTree.S.fg ->
(('a, 'm) BatFingerTree.S.fg * 'a) option, 'a, 'm)
BatFingerTree.S.wrap
val rear_exn :
(('a, 'm) BatFingerTree.S.fg -> ('a, 'm) BatFingerTree.S.fg * 'a, 'a,
'm)
BatFingerTree.S.wrap
val size : ('a, 'm) BatFingerTree.S.fg -> int
val is_empty : ('a, 'm) BatFingerTree.S.fg -> bool
val fold_left :
('acc -> 'a -> 'acc) -> 'acc -> ('a, 'm) BatFingerTree.S.fg -> 'acc
val fold_right :
('acc -> 'a -> 'acc) -> 'acc -> ('a, 'm) BatFingerTree.S.fg -> 'acc
val iter : ('a -> unit) -> ('a, 'm) BatFingerTree.S.fg -> unit
val iter_right : ('a -> unit) -> ('a, 'm) BatFingerTree.S.fg -> unit
val compare :
('a -> 'a -> int) ->
('a, 'm) BatFingerTree.S.fg -> ('a, 'm) BatFingerTree.S.fg -> int
val equal :
('a -> 'a -> bool) ->
('a, 'm) BatFingerTree.S.fg -> ('a, 'm) BatFingerTree.S.fg -> bool
val enum : ('a, 'm) BatFingerTree.S.fg -> 'a BatEnum.t
val backwards : ('a, 'm) BatFingerTree.S.fg -> 'a BatEnum.t
val to_list : ('a, 'm) BatFingerTree.S.fg -> 'a list
val to_list_backwards : ('a, 'm) BatFingerTree.S.fg -> 'a list
val of_enum :
('a BatEnum.t -> ('a, 'm) BatFingerTree.S.fg, 'a, 'm)
BatFingerTree.S.wrap
val of_backwards :
('a BatEnum.t -> ('a, 'm) BatFingerTree.S.fg, 'a, 'm)
BatFingerTree.S.wrap
val of_list :
('a list -> ('a, 'm) BatFingerTree.S.fg, 'a, 'm) BatFingerTree.S.wrap
val of_list_backwards :
('a list -> ('a, 'm) BatFingerTree.S.fg, 'a, 'm) BatFingerTree.S.wrap
val map :
(('a -> 'b) ->
('a, 'm) BatFingerTree.S.fg -> ('b, 'm) BatFingerTree.S.fg, 'b, 'm)
BatFingerTree.S.wrap
val map_right :
(('a -> 'b) ->
('a, 'm) BatFingerTree.S.fg -> ('b, 'm) BatFingerTree.S.fg, 'b, 'm)
BatFingerTree.S.wrap
val append :
(('a, 'm) BatFingerTree.S.fg ->
('a, 'm) BatFingerTree.S.fg -> ('a, 'm) BatFingerTree.S.fg, 'a, 'm)
BatFingerTree.S.wrap
val reverse :
(('a, 'm) BatFingerTree.S.fg -> ('a, 'm) BatFingerTree.S.fg, 'a, 'm)
BatFingerTree.S.wrap
val print :
?first:string ->
?last:string ->
?sep:string ->
('a, 'b) BatIO.printer ->
(('a, 'c) BatFingerTree.S.fg, 'b) BatIO.printer
end
module Generic :
sig
type ('a, 'm) fg
type ('wrapped_type, 'a, 'm) wrap =
monoid:'m monoid -> measure:('a -> 'm) -> 'wrapped_type
val empty : ('a, 'm) fg
val singleton : 'a -> ('a, 'm) fg
val cons : (('a, 'm) fg -> 'a -> ('a, 'm) fg, 'a, 'm) wrap
val snoc : (('a, 'm) fg -> 'a -> ('a, 'm) fg, 'a, 'm) wrap
val front : (('a, 'm) fg -> (('a, 'm) fg * 'a) option, 'a, 'm) wrap
val front_exn : (('a, 'm) fg -> ('a, 'm) fg * 'a, 'a, 'm) wrap
val head : ('a, 'm) fg -> 'a option
val head_exn : ('a, 'm) fg -> 'a
val last : ('a, 'm) fg -> 'a option
val last_exn : ('a, 'm) fg -> 'a
val tail : (('a, 'm) fg -> ('a, 'm) fg option, 'a, 'm) wrap
val tail_exn : (('a, 'm) fg -> ('a, 'm) fg, 'a, 'm) wrap
val init : (('a, 'm) fg -> ('a, 'm) fg option, 'a, 'm) wrap
val init_exn : (('a, 'm) fg -> ('a, 'm) fg, 'a, 'm) wrap
val rear : (('a, 'm) fg -> (('a, 'm) fg * 'a) option, 'a, 'm) wrap
val rear_exn : (('a, 'm) fg -> ('a, 'm) fg * 'a, 'a, 'm) wrap
val size : ('a, 'm) fg -> int
val is_empty : ('a, 'm) fg -> bool
val fold_left : ('acc -> 'a -> 'acc) -> 'acc -> ('a, 'm) fg -> 'acc
val fold_right : ('acc -> 'a -> 'acc) -> 'acc -> ('a, 'm) fg -> 'acc
val iter : ('a -> unit) -> ('a, 'm) fg -> unit
val iter_right : ('a -> unit) -> ('a, 'm) fg -> unit
val compare : ('a -> 'a -> int) -> ('a, 'm) fg -> ('a, 'm) fg -> int
val equal : ('a -> 'a -> bool) -> ('a, 'm) fg -> ('a, 'm) fg -> bool
val enum : ('a, 'm) fg -> 'a BatEnum.t
val backwards : ('a, 'm) fg -> 'a BatEnum.t
val to_list : ('a, 'm) fg -> 'a list
val to_list_backwards : ('a, 'm) fg -> 'a list
val of_enum : ('a BatEnum.t -> ('a, 'm) fg, 'a, 'm) wrap
val of_backwards : ('a BatEnum.t -> ('a, 'm) fg, 'a, 'm) wrap
val of_list : ('a list -> ('a, 'm) fg, 'a, 'm) wrap
val of_list_backwards : ('a list -> ('a, 'm) fg, 'a, 'm) wrap
val map : (('a -> 'b) -> ('a, 'm) fg -> ('b, 'm) fg, 'b, 'm) wrap
val map_right : (('a -> 'b) -> ('a, 'm) fg -> ('b, 'm) fg, 'b, 'm) wrap
val append : (('a, 'm) fg -> ('a, 'm) fg -> ('a, 'm) fg, 'a, 'm) wrap
val reverse : (('a, 'm) fg -> ('a, 'm) fg, 'a, 'm) wrap
val print :
?first:string ->
?last:string ->
?sep:string ->
('a, 'b) BatIO.printer -> (('a, 'c) fg, 'b) BatIO.printer
val lookup : (('m -> bool) -> ('a, 'm) fg -> 'a, 'a, 'm) wrap
val measure : (('a, 'm) fg -> 'm, 'a, 'm) wrap
val split :
(('m -> bool) -> ('a, 'm) fg -> ('a, 'm) fg * ('a, 'm) fg, 'a, 'm)
wrap
end
type 'a t
type ('a, 'm) fg = 'a t
type ('wrapped_type, 'a, 'm) wrap = 'wrapped_type
val empty : ('a, 'm) fg
val singleton : 'a -> ('a, 'm) fg
val cons : (('a, 'm) fg -> 'a -> ('a, 'm) fg, 'a, 'm) wrap
val snoc : (('a, 'm) fg -> 'a -> ('a, 'm) fg, 'a, 'm) wrap
val front : (('a, 'm) fg -> (('a, 'm) fg * 'a) option, 'a, 'm) wrap
val front_exn : (('a, 'm) fg -> ('a, 'm) fg * 'a, 'a, 'm) wrap
val head : ('a, 'm) fg -> 'a option
val head_exn : ('a, 'm) fg -> 'a
val last : ('a, 'm) fg -> 'a option
val last_exn : ('a, 'm) fg -> 'a
val tail : (('a, 'm) fg -> ('a, 'm) fg option, 'a, 'm) wrap
val tail_exn : (('a, 'm) fg -> ('a, 'm) fg, 'a, 'm) wrap
val init : (('a, 'm) fg -> ('a, 'm) fg option, 'a, 'm) wrap
val init_exn : (('a, 'm) fg -> ('a, 'm) fg, 'a, 'm) wrap
val rear : (('a, 'm) fg -> (('a, 'm) fg * 'a) option, 'a, 'm) wrap
val rear_exn : (('a, 'm) fg -> ('a, 'm) fg * 'a, 'a, 'm) wrap
val is_empty : ('a, 'm) fg -> bool
val fold_left : ('acc -> 'a -> 'acc) -> 'acc -> ('a, 'm) fg -> 'acc
val fold_right : ('acc -> 'a -> 'acc) -> 'acc -> ('a, 'm) fg -> 'acc
val iter : ('a -> unit) -> ('a, 'm) fg -> unit
val iter_right : ('a -> unit) -> ('a, 'm) fg -> unit
val compare : ('a -> 'a -> int) -> ('a, 'm) fg -> ('a, 'm) fg -> int
val equal : ('a -> 'a -> bool) -> ('a, 'm) fg -> ('a, 'm) fg -> bool
val enum : ('a, 'm) fg -> 'a BatEnum.t
val backwards : ('a, 'm) fg -> 'a BatEnum.t
val to_list : ('a, 'm) fg -> 'a list
val to_list_backwards : ('a, 'm) fg -> 'a list
val of_enum : ('a BatEnum.t -> ('a, 'm) fg, 'a, 'm) wrap
val of_backwards : ('a BatEnum.t -> ('a, 'm) fg, 'a, 'm) wrap
val of_list : ('a list -> ('a, 'm) fg, 'a, 'm) wrap
val of_list_backwards : ('a list -> ('a, 'm) fg, 'a, 'm) wrap
val map : (('a -> 'b) -> ('a, 'm) fg -> ('b, 'm) fg, 'b, 'm) wrap
val map_right : (('a -> 'b) -> ('a, 'm) fg -> ('b, 'm) fg, 'b, 'm) wrap
val append : (('a, 'm) fg -> ('a, 'm) fg -> ('a, 'm) fg, 'a, 'm) wrap
val reverse : (('a, 'm) fg -> ('a, 'm) fg, 'a, 'm) wrap
val print :
?first:string ->
?last:string ->
?sep:string -> ('a, 'b) BatIO.printer -> (('a, 'c) fg, 'b) BatIO.printer
val size : 'a BatFingerTree.t -> int
val split_at :
'a BatFingerTree.t -> int -> 'a BatFingerTree.t * 'a BatFingerTree.t
val get : 'a BatFingerTree.t -> int -> 'a
val set : 'a BatFingerTree.t -> int -> 'a -> 'a BatFingerTree.t
val update : 'a BatFingerTree.t -> int -> ('a -> 'a) -> 'a BatFingerTree.t
val of_list_for_test : 'a list -> 'a BatFingerTree.t
val verify_measure : 'a BatFingerTree.t -> 'a BatFingerTree.t
val invariants : 'a BatFingerTree.t -> unit
end