package bap-std

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Lazy sequence

type abbreviation for 'a Sequence.t

Lazy sequence.

This is the extension of Core_kernel's Sequence module

@see <https://ocaml.janestreet.com/ocaml-core/latest/doc/core_kernel/Std/Sequence.mod/> Sequence

type 'a t = 'a Core_kernel.Sequence.t
val bin_t : 'a Core_kernel.Bin_prot.Type_class.t -> 'a t Core_kernel.Bin_prot.Type_class.t
val bin_read_t : 'a Core_kernel.Bin_prot.Read.reader -> 'a t Core_kernel.Bin_prot.Read.reader
val __bin_read_t__ : 'a Core_kernel.Bin_prot.Read.reader -> (int -> 'a t) Core_kernel.Bin_prot.Read.reader
val bin_reader_t : 'a Core_kernel.Bin_prot.Type_class.reader -> 'a t Core_kernel.Bin_prot.Type_class.reader
val bin_size_t : 'a Core_kernel.Bin_prot.Size.sizer -> 'a t Core_kernel.Bin_prot.Size.sizer
val bin_write_t : 'a Core_kernel.Bin_prot.Write.writer -> 'a t Core_kernel.Bin_prot.Write.writer
val bin_writer_t : 'a Core_kernel.Bin_prot.Type_class.writer -> 'a t Core_kernel.Bin_prot.Type_class.writer
val bin_shape_t : Core_kernel.Bin_prot.Shape.t -> Core_kernel.Bin_prot.Shape.t
val t_of_sexp : (Ppx_sexp_conv_lib.Sexp.t -> 'a) -> Ppx_sexp_conv_lib.Sexp.t -> 'a t
include module type of Core_kernel.Sequence with type 'a t := 'a t
module Merge_with_duplicates_element = Core_kernel.Sequence.Merge_with_duplicates_element
include module type of struct include Base.Sequence end with module Merge_with_duplicates_element := Base.Sequence.Merge_with_duplicates_element with type 'a t := 'a t
val sexp_of_t : ('a -> Base__.Ppx_sexp_conv_lib.Sexp.t) -> 'a t -> Base__.Ppx_sexp_conv_lib.Sexp.t
type 'a sequence = 'a t
val mem : 'a t -> 'a -> equal:('a -> 'a -> bool) -> bool
val length : 'a t -> int
val iter : 'a t -> f:('a -> unit) -> unit
val fold : 'a t -> init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val fold_result : 'a t -> init:'accum -> f:('accum -> 'a -> ('accum, 'e) Base__.Result.t) -> ('accum, 'e) Base__.Result.t
val fold_until : 'a t -> init:'accum -> f:('accum -> 'a -> ('accum, 'final) Base__.Container_intf.Continue_or_stop.t) -> finish:('accum -> 'final) -> 'final
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum : (module Base__.Commutative_group.S with type t = 'sum) -> 'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt : 'a t -> compare:('a -> 'a -> int) -> 'a option
val max_elt : 'a t -> compare:('a -> 'a -> int) -> 'a option
val foldi : ('a t, 'a, 'b) Base__.Indexed_container_intf.foldi
val iteri : ('a t, 'a) Base__.Indexed_container_intf.iteri
val existsi : 'a t -> f:(int -> 'a -> bool) -> bool
val counti : 'a t -> f:(int -> 'a -> bool) -> int
val findi : 'a t -> f:(int -> 'a -> bool) -> (int * 'a) option
val find_mapi : 'a t -> f:(int -> 'a -> 'b option) -> 'b option
val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
val (>>|) : 'a t -> ('a -> 'b) -> 'b t
val bind : 'a t -> f:('a -> 'b t) -> 'b t
val return : 'a -> 'a t
val map : 'a t -> f:('a -> 'b) -> 'b t
val join : 'a t t -> 'a t
val ignore_m : 'a t -> unit t
val all : 'a t list -> 'a list t
val all_unit : unit t list -> unit t
val all_ignore : unit t list -> unit t
  • deprecated [since 2018-02] Use [all_unit]
val empty : 'a t
val next : 'a t -> ('a * 'a t) option
val unfold_step : init:'s -> f:('s -> ('a, 's) Step.t) -> 'a t
val unfold : init:'s -> f:('s -> ('a * 's) option) -> 'a t
val unfold_with : 'a t -> init:'s -> f:('s -> 'a -> ('b, 's) Step.t) -> 'b t
val unfold_with_and_finish : 'a t -> init:'s_a -> running_step:('s_a -> 'a -> ('b, 's_a) Step.t) -> inner_finished:('s_a -> 's_b) -> finishing_step:('s_b -> ('b, 's_b) Step.t) -> 'b t
val nth : 'a t -> int -> 'a option
val nth_exn : 'a t -> int -> 'a
val folding_map : 'a t -> init:'b -> f:('b -> 'a -> 'b * 'c) -> 'c t
val folding_mapi : 'a t -> init:'b -> f:(int -> 'b -> 'a -> 'b * 'c) -> 'c t
val mapi : 'a t -> f:(int -> 'a -> 'b) -> 'b t
val filteri : 'a t -> f:(int -> 'a -> bool) -> 'a t
val merge : 'a t -> 'a t -> cmp:('a -> 'a -> int) -> 'a t
val merge_with_duplicates : 'a t -> 'b t -> cmp:('a -> 'b -> int) -> ('a, 'b) Base.Sequence.Merge_with_duplicates_element.t t
val hd : 'a t -> 'a option
val hd_exn : 'a t -> 'a
val tl : 'a t -> 'a t option
val tl_eagerly_exn : 'a t -> 'a t
val find_exn : 'a t -> f:('a -> bool) -> 'a
val for_alli : 'a t -> f:(int -> 'a -> bool) -> bool
val append : 'a t -> 'a t -> 'a t
val concat : 'a t t -> 'a t
val concat_map : 'a t -> f:('a -> 'b t) -> 'b t
val concat_mapi : 'a t -> f:(int -> 'a -> 'b t) -> 'b t
val interleave : 'a t t -> 'a t
val round_robin : 'a t list -> 'a t
val zip : 'a t -> 'b t -> ('a * 'b) t
val zip_full : 'a t -> 'b t -> [ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] t
val reduce_exn : 'a t -> f:('a -> 'a -> 'a) -> 'a
val reduce : 'a t -> f:('a -> 'a -> 'a) -> 'a option
val group : 'a t -> break:('a -> 'a -> bool) -> 'a list t
val find_consecutive_duplicate : 'a t -> equal:('a -> 'a -> bool) -> ('a * 'a) option
val remove_consecutive_duplicates : 'a t -> equal:('a -> 'a -> bool) -> 'a t
val range : ?stride:int -> ?start:[ `exclusive | `inclusive ] -> ?stop:[ `exclusive | `inclusive ] -> int -> int -> int t
val init : int -> f:(int -> 'a) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi : 'a t -> f:(int -> 'a -> 'b option) -> 'b t
val filter_opt : 'a option t -> 'a t
val sub : 'a t -> pos:int -> len:int -> 'a t
val take : 'a t -> int -> 'a t
val drop : 'a t -> int -> 'a t
val drop_eagerly : 'a t -> int -> 'a t
val take_while : 'a t -> f:('a -> bool) -> 'a t
val drop_while : 'a t -> f:('a -> bool) -> 'a t
val drop_while_option : 'a t -> f:('a -> bool) -> ('a * 'a t) option
val split_n : 'a t -> int -> 'a list * 'a t
val split_n_eagerly : 'a t -> int -> 'a t * 'a t
  • deprecated [since 2015-11] Use {!Sequence.split_n} instead.
val chunks_exn : 'a t -> int -> 'a list t
val shift_right : 'a t -> 'a -> 'a t
val shift_right_with_list : 'a t -> 'a list -> 'a t
val shift_left : 'a t -> int -> 'a t
val cartesian_product : 'a t -> 'b t -> ('a * 'b) t
val interleaved_cartesian_product : 'a t -> 'b t -> ('a * 'b) t
val intersperse : 'a t -> sep:'a -> 'a t
val cycle_list_exn : 'a list -> 'a t
val repeat : 'a -> 'a t
val singleton : 'a -> 'a t
val delayed_fold : 'a t -> init:'s -> f:('s -> 'a -> k:('s -> 'r) -> 'r) -> finish:('s -> 'r) -> 'r
val fold_m : bind:('acc_m -> f:('acc -> 'acc_m) -> 'acc_m) -> return:('acc -> 'acc_m) -> 'elt t -> init:'acc -> f:('acc -> 'elt -> 'acc_m) -> 'acc_m
val iter_m : bind:('unit_m -> f:(unit -> 'unit_m) -> 'unit_m) -> return:(unit -> 'unit_m) -> 'elt t -> f:('elt -> 'unit_m) -> 'unit_m
val to_list_rev : 'a t -> 'a list
val of_list : 'a list -> 'a t
val of_lazy : 'a t Base__.Lazy.t -> 'a t
val memoize : 'a t -> 'a t
val force_eagerly : 'a t -> 'a t
val bounded_length : 'a t -> at_most:int -> [ `Greater | `Is of int ]
val length_is_bounded_by : ?min:int -> ?max:int -> 'a t -> bool
val merge_all : 'a t list -> compare:('a -> 'a -> int) -> 'a t

Merges elements from sequences that are assumed to be sorted by compare to produce a sequence also sorted by compare. If any of the inputs are not sorted, the order of the output is not guaranteed to be sorted.

This includes duplicate elements in the output (whether they occur within one input sequence, or across different input sequences).

val filter : 'a t -> f:('a -> bool) -> 'a t

for compatibility with Core <= 111.28

val compare : ('a -> 'b -> int) -> 'a t -> 'b t -> int
val of_array : 'a array -> 'a t
val cons : 'a -> 'a t -> 'a t
val is_empty : 'a t -> bool
OCaml

Innovation. Community. Security.