sig
type 'a sequence = ('a -> unit) -> unit
type 'a equal = 'a -> 'a -> bool
type 'a ord = 'a -> 'a -> int
type 'a hash = 'a -> int
type 'a or_error = [ `Error of string | `Ok of 'a ]
type 'a printer = Format.formatter -> 'a -> unit
module Iterable :
sig
type 'a t
val of_list : 'a list -> 'a OLinq.Iterable.t
val of_vec : 'a OLinq_vec.t -> 'a OLinq.Iterable.t
val to_list : 'a OLinq.Iterable.t -> 'a list
val to_vec : 'a OLinq.Iterable.t -> 'a OLinq_vec.t
end
type ('a, 'b) map = ('a, 'b) OLinq_map.t
type ('a, +'b) t constraint 'b = [< `Any | `AtMostOne | `One ]
type 'a t_any = ('a, [ `Any ]) OLinq.t
type 'a t_one = ('a, [ `One ]) OLinq.t
type 'a t_at_most_one = ('a, [ `AtMostOne ]) OLinq.t
val empty : ('a, [< `Any | `AtMostOne | `One > `AtMostOne ]) OLinq.t
val return : 'a -> ('a, [< `Any | `AtMostOne | `One > `One ]) OLinq.t
val of_list : 'a list -> ('a, [ `Any ]) OLinq.t
val of_array : 'a array -> ('a, [ `Any ]) OLinq.t
val of_array_i : 'a array -> (int * 'a, [ `Any ]) OLinq.t
val range : int -> int -> (int, [ `Any ]) OLinq.t
val ( -- ) : int -> int -> (int, [ `Any ]) OLinq.t
val of_hashtbl : ('a, 'b) Hashtbl.t -> ('a * 'b, [ `Any ]) OLinq.t
val of_seq : 'a OLinq.sequence -> ('a, [ `Any ]) OLinq.t
val of_vec : 'a OLinq_vec.t -> ('a, [ `Any ]) OLinq.t
val of_queue : 'a Queue.t -> ('a, [ `Any ]) OLinq.t
val of_stack : 'a Stack.t -> ('a, [ `Any ]) OLinq.t
val of_string : string -> (char, [ `Any ]) OLinq.t
val of_map : ('a, 'b) OLinq.map -> ('a * 'b, [ `Any ]) OLinq.t
val of_multimap : ('a, 'b list) OLinq.map -> ('a * 'b, [ `Any ]) OLinq.t
val run :
?limit:int ->
('a, [< `Any | `AtMostOne | `One ]) OLinq.t -> 'a OLinq.Iterable.t
val run_list :
?limit:int -> ('a, [< `Any | `AtMostOne | `One ]) OLinq.t -> 'a list
val run_array :
?limit:int -> ('a, [< `Any | `AtMostOne | `One ]) OLinq.t -> 'a array
val run_vec :
?limit:int ->
('a, [< `Any | `AtMostOne | `One ]) OLinq.t -> 'a OLinq_vec.t
val run1 : ('a, [ `One ]) OLinq.t -> 'a
val run_head : ('a, [< `Any | `AtMostOne | `One ]) OLinq.t -> 'a option
val run1_exn : ('a, [< `Any | `AtMostOne | `One ]) OLinq.t -> 'a
val map :
('a -> 'b) ->
('a, [< `Any | `AtMostOne | `One ] as 'c) OLinq.t -> ('b, 'c) OLinq.t
val ( >|= ) :
('a, [< `Any | `AtMostOne | `One ] as 'c) OLinq.t ->
('a -> 'b) -> ('b, 'c) OLinq.t
val filter :
('a -> bool) ->
('a, [< `Any | `AtMostOne | `One ]) OLinq.t -> ('a, [ `Any ]) OLinq.t
val size :
('a, [< `Any | `AtMostOne | `One ]) OLinq.t ->
(int, [< `Any | `AtMostOne | `One > `One ]) OLinq.t
val choose :
('a, [< `Any | `AtMostOne | `One ]) OLinq.t ->
('a, [< `Any | `AtMostOne | `One > `AtMostOne ]) OLinq.t
val filter_map :
('a -> 'b option) ->
('a, [< `Any | `AtMostOne | `One ]) OLinq.t -> ('b, [ `Any ]) OLinq.t
val flat_map_seq :
('a -> 'b OLinq.sequence) ->
('a, [< `Any | `AtMostOne | `One ]) OLinq.t -> ('b, [ `Any ]) OLinq.t
val flat_map_l :
('a -> 'b list) ->
('a, [< `Any | `AtMostOne | `One ]) OLinq.t -> ('b, [ `Any ]) OLinq.t
val flatten_list :
('a list, [< `Any | `AtMostOne | `One ]) OLinq.t ->
('a, [ `Any ]) OLinq.t
val flatten_seq :
('a OLinq.sequence, [< `Any | `AtMostOne | `One ]) OLinq.t ->
('a, [ `Any ]) OLinq.t
val flatten_map :
(('a, 'b) OLinq.map, [< `Any | `AtMostOne | `One ]) OLinq.t ->
('a * 'b, [ `Any ]) OLinq.t
val flatten_multimap :
(('a, 'b list) OLinq.map, [< `Any | `AtMostOne | `One ]) OLinq.t ->
('a * 'b, [ `Any ]) OLinq.t
val take :
int ->
('a, [< `Any | `AtMostOne | `One ]) OLinq.t -> ('a, [ `Any ]) OLinq.t
val take1 :
('a, [< `Any | `AtMostOne | `One ]) OLinq.t ->
('a, [< `Any | `AtMostOne | `One > `AtMostOne ]) OLinq.t
val take_while :
('a -> bool) ->
('a, [< `Any | `AtMostOne | `One ]) OLinq.t -> ('a, [ `Any ]) OLinq.t
val sort :
?cmp:'a OLinq.ord ->
unit -> ('a, [ `Any ]) OLinq.t -> ('a, [ `Any ]) OLinq.t
val sort_by :
?cmp:'b OLinq.ord ->
('a -> 'b) -> ('a, [ `Any ]) OLinq.t -> ('a, [ `Any ]) OLinq.t
val distinct :
?cmp:'a OLinq.ord ->
unit -> ('a, [ `Any ]) OLinq.t -> ('a, [ `Any ]) OLinq.t
val group_by :
?cmp:'b OLinq.ord ->
?eq:'b OLinq.equal ->
?hash:'b OLinq.hash ->
('a -> 'b) -> ('a, [ `Any ]) OLinq.t -> ('b * 'a list, [ `Any ]) OLinq.t
val group_by_reflect :
?cmp:'b OLinq.ord ->
?eq:'b OLinq.equal ->
?hash:'b OLinq.hash ->
('a -> 'b) ->
('a, [ `Any ]) OLinq.t ->
(('b, 'a list) OLinq.map, [< `Any | `AtMostOne | `One > `One ]) OLinq.t
val count :
?cmp:'a OLinq.ord ->
?eq:'a OLinq.equal ->
?hash:'a OLinq.hash ->
unit -> ('a, [ `Any ]) OLinq.t -> ('a * int, [ `Any ]) OLinq.t
val count_reflect :
?cmp:'a OLinq.ord ->
?eq:'a OLinq.equal ->
?hash:'a OLinq.hash ->
unit ->
('a, [ `Any ]) OLinq.t ->
(('a, int) OLinq.map, [< `Any | `AtMostOne | `One > `One ]) OLinq.t
val fold :
('b -> 'a -> 'b) ->
'b ->
('a, [< `Any | `AtMostOne | `One ]) OLinq.t ->
('b, [< `Any | `AtMostOne | `One > `One ]) OLinq.t
val is_empty :
('a, [< `Any | `AtMostOne ]) OLinq.t ->
(bool, [< `Any | `AtMostOne | `One > `One ]) OLinq.t
val sum :
(int, [< `Any | `AtMostOne ]) OLinq.t ->
(int, [< `Any | `AtMostOne | `One > `One ]) OLinq.t
val contains :
?eq:'a OLinq.equal ->
'a ->
('a, [< `Any | `AtMostOne | `One ]) OLinq.t ->
(bool, [< `Any | `AtMostOne | `One > `One ]) OLinq.t
val average :
(int, [< `Any | `AtMostOne | `One ]) OLinq.t ->
(int, [< `Any | `AtMostOne | `One > `One ]) OLinq.t
val max :
(int, [< `Any | `AtMostOne | `One ]) OLinq.t ->
(int, [< `Any | `AtMostOne | `One > `One ]) OLinq.t
val min :
(int, [< `Any | `AtMostOne | `One ]) OLinq.t ->
(int, [< `Any | `AtMostOne | `One > `One ]) OLinq.t
val for_all :
('a -> bool) ->
('a, [< `Any | `AtMostOne | `One ]) OLinq.t ->
(bool, [< `Any | `AtMostOne | `One > `One ]) OLinq.t
val exists :
('a -> bool) ->
('a, [< `Any | `AtMostOne | `One ]) OLinq.t ->
(bool, [< `Any | `AtMostOne | `One > `One ]) OLinq.t
val find :
('a -> bool) ->
('a, [< `Any | `AtMostOne | `One ]) OLinq.t ->
('a option, [< `Any | `AtMostOne | `One > `One ]) OLinq.t
val find_map :
('a -> 'b option) ->
('a, [< `Any | `AtMostOne | `One ]) OLinq.t ->
('b option, [< `Any | `AtMostOne | `One > `One ]) OLinq.t
val join :
?cmp:'key OLinq.ord ->
?eq:'key OLinq.equal ->
?hash:'key OLinq.hash ->
('a -> 'key) ->
('b -> 'key) ->
merge:('key -> 'a -> 'b -> 'c option) ->
('a, [< `Any | `AtMostOne | `One ]) OLinq.t ->
('b, [< `Any | `AtMostOne | `One ]) OLinq.t -> ('c, [ `Any ]) OLinq.t
val outer_join :
?cmp:'key OLinq.ord ->
?eq:'key OLinq.equal ->
?hash:'key OLinq.hash ->
('a -> 'key) ->
('b -> 'key) ->
merge:('key -> 'a list -> 'b list -> 'c option) ->
('a, [< `Any | `AtMostOne | `One ]) OLinq.t ->
('b, [< `Any | `AtMostOne | `One ]) OLinq.t -> ('c, [ `Any ]) OLinq.t
val group_join :
?cmp:'a OLinq.ord ->
?eq:'a OLinq.equal ->
?hash:'a OLinq.hash ->
('b -> 'a) ->
('a, [< `Any | `AtMostOne | `One ]) OLinq.t ->
('b, [< `Any | `AtMostOne | `One ]) OLinq.t ->
('a * 'b list, [ `Any ]) OLinq.t
val group_join_reflect :
?cmp:'a OLinq.ord ->
?eq:'a OLinq.equal ->
?hash:'a OLinq.hash ->
('b -> 'a) ->
('a, [< `Any | `AtMostOne | `One ]) OLinq.t ->
('b, [< `Any | `AtMostOne | `One ]) OLinq.t ->
(('a, 'b list) OLinq.map, [< `Any | `AtMostOne | `One > `One ]) OLinq.t
val product :
('a, [< `Any | `AtMostOne | `One ]) OLinq.t ->
('b, [< `Any | `AtMostOne | `One ]) OLinq.t ->
('a * 'b, [ `Any ]) OLinq.t
val append :
('a, [< `Any | `AtMostOne | `One ]) OLinq.t ->
('a, [< `Any | `AtMostOne | `One ]) OLinq.t -> ('a, [ `Any ]) OLinq.t
val inter :
?cmp:'a OLinq.ord ->
?eq:'a OLinq.equal ->
?hash:'a OLinq.hash ->
('a, [< `Any | `AtMostOne | `One ]) OLinq.t ->
('a, [< `Any | `AtMostOne | `One ]) OLinq.t -> ('a, [ `Any ]) OLinq.t
val union :
?cmp:'a OLinq.ord ->
?eq:'a OLinq.equal ->
?hash:'a OLinq.hash ->
('a, [< `Any | `AtMostOne | `One ]) OLinq.t ->
('a, [< `Any | `AtMostOne | `One ]) OLinq.t -> ('a, [ `Any ]) OLinq.t
val diff :
?cmp:'a OLinq.ord ->
?eq:'a OLinq.equal ->
?hash:'a OLinq.hash ->
('a, [< `Any | `AtMostOne | `One ]) OLinq.t ->
('a, [< `Any | `AtMostOne | `One ]) OLinq.t -> ('a, [ `Any ]) OLinq.t
val subset :
?cmp:'a OLinq.ord ->
?eq:'a OLinq.equal ->
?hash:'a OLinq.hash ->
('a, [< `Any | `AtMostOne | `One ]) OLinq.t ->
('a, [< `Any | `AtMostOne | `One ]) OLinq.t -> (bool, [ `One ]) OLinq.t
val map_fst :
('a -> 'b) ->
('a * 'c, [< `Any | `AtMostOne | `One ] as 'd) OLinq.t ->
('b * 'c, 'd) OLinq.t
val map_snd :
('a -> 'b) ->
('c * 'a, [< `Any | `AtMostOne | `One ] as 'd) OLinq.t ->
('c * 'b, 'd) OLinq.t
val flatten_opt :
('a option, [< `Any | `AtMostOne | `One ]) OLinq.t ->
('a, [ `Any ]) OLinq.t
val pure : 'a -> ('a, [< `Any | `AtMostOne | `One ]) OLinq.t
val app :
('a -> 'b, [< `Any | `AtMostOne | `One ] as 'c) OLinq.t ->
('a, 'c) OLinq.t -> ('b, 'c) OLinq.t
val ( <*> ) :
('a -> 'b, [< `Any | `AtMostOne | `One ] as 'c) OLinq.t ->
('a, 'c) OLinq.t -> ('b, 'c) OLinq.t
val flat_map :
('a -> ('b, [< `Any | `AtMostOne | `One ]) OLinq.t) ->
('a, [< `Any | `AtMostOne | `One ]) OLinq.t -> ('b, [ `Any ]) OLinq.t
val ( >>= ) :
('a, [< `Any | `AtMostOne | `One ]) OLinq.t ->
('a -> ('b, [< `Any | `AtMostOne | `One ]) OLinq.t) ->
('b, [ `Any ]) OLinq.t
val lazy_ :
('a lazy_t, [< `Any | `AtMostOne | `One ] as 'b) OLinq.t ->
('a, 'b) OLinq.t
exception UnwrapNone
val opt_unwrap_exn :
('a option, [< `Any | `AtMostOne | `One ] as 'b) OLinq.t ->
('a, 'b) OLinq.t
module Infix :
sig
val ( -- ) : int -> int -> (int, [ `Any ]) OLinq.t
val ( >|= ) :
('a, [< `Any | `AtMostOne | `One ] as 'c) OLinq.t ->
('a -> 'b) -> ('b, 'c) OLinq.t
val ( <*> ) :
('a -> 'b, [< `Any | `AtMostOne | `One ] as 'c) OLinq.t ->
('a, 'c) OLinq.t -> ('b, 'c) OLinq.t
val ( >>= ) :
('a, [< `Any | `AtMostOne | `One ]) OLinq.t ->
('a -> ('b, [< `Any | `AtMostOne | `One ]) OLinq.t) ->
('b, [ `Any ]) OLinq.t
end
val reflect_vec :
('a, [< `Any | `AtMostOne | `One ]) OLinq.t ->
('a OLinq_vec.t, [< `Any | `AtMostOne | `One > `One ]) OLinq.t
val reflect_list :
('a, [< `Any | `AtMostOne | `One ]) OLinq.t ->
('a list, [< `Any | `AtMostOne | `One > `One ]) OLinq.t
val reflect_hashtbl :
('a * 'b, [< `Any | `AtMostOne | `One ]) OLinq.t ->
(('a, 'b) Hashtbl.t, [< `Any | `AtMostOne | `One > `One ]) OLinq.t
val reflect_queue :
('a, [< `Any | `AtMostOne | `One ]) OLinq.t ->
('a Queue.t, [< `Any | `AtMostOne | `One > `One ]) OLinq.t
val reflect_stack :
('a, [< `Any | `AtMostOne | `One ]) OLinq.t ->
('a Stack.t, [< `Any | `AtMostOne | `One > `One ]) OLinq.t
module AdaptSet :
functor (S : Set.S) ->
sig
val of_set : S.t -> (S.elt, [ `Any ]) OLinq.t
val reflect :
(S.elt, [< `Any | `AtMostOne | `One ]) OLinq.t ->
(S.t, [< `Any | `AtMostOne | `One > `One ]) OLinq.t
val run : (S.elt, [< `Any | `AtMostOne | `One ]) OLinq.t -> S.t
end
module AdaptMap :
functor (M : Map.S) ->
sig
val of_map : 'a M.t -> (M.key * 'a, [ `Any ]) OLinq.t
val reflect :
(M.key * 'a, [< `Any | `AtMostOne | `One ]) OLinq.t ->
('a M.t, [ `One ]) OLinq.t
val run :
(M.key * 'a, [< `Any | `AtMostOne | `One ]) OLinq.t -> 'a M.t
end
module IO :
sig
val read_chan :
Pervasives.in_channel ->
(string, [< `Any | `AtMostOne | `One > `One ]) OLinq.t
val read_file :
string -> (string, [< `Any | `AtMostOne | `One > `One ]) OLinq.t
val lines :
(string, [< `Any | `AtMostOne | `One ]) OLinq.t ->
(string, [ `Any ]) OLinq.t
val lines_l :
(string, [< `Any | `AtMostOne | `One ] as 'a) OLinq.t ->
(string list, 'a) OLinq.t
val concat :
string ->
(string, [< `Any | `AtMostOne | `One ]) OLinq.t ->
(string, [< `Any | `AtMostOne | `One > `One ]) OLinq.t
val unlines :
(string, [< `Any | `AtMostOne | `One ]) OLinq.t ->
(string, [< `Any | `AtMostOne | `One > `One ]) OLinq.t
val out :
Pervasives.out_channel ->
(string, [< `Any | `AtMostOne | `One ]) OLinq.t -> unit
val out_lines :
Pervasives.out_channel ->
(string, [< `Any | `AtMostOne | `One ]) OLinq.t -> unit
val to_file :
string ->
(string, [< `Any | `AtMostOne | `One ]) OLinq.t ->
unit OLinq.or_error
val to_file_exn :
string -> (string, [< `Any | `AtMostOne | `One ]) OLinq.t -> unit
val to_file_lines :
string ->
(string, [< `Any | `AtMostOne | `One ]) OLinq.t ->
unit OLinq.or_error
val to_file_lines_exn :
string -> (string, [< `Any | `AtMostOne | `One ]) OLinq.t -> unit
end
val print :
?sep:string ->
'a OLinq.printer ->
('a, [< `Any | `AtMostOne | `One ]) OLinq.t OLinq.printer
end