module type S = sig
(*
type 'a t = unit -> 'a node
and 'a node = 'a Stdcompat__init.seq_node =
  | Nil
  | Cons of 'a * 'a t
*)

type 'a t = unit -> 'a node
and 'a node = 'a Stdcompat__init.seq_node =
  | Nil
  | Cons of 'a * 'a t

(** @since 4.07.0:
    type 'a t = unit -> 'a node
    and 'a node =
      | Nil 
      | Cons of 'a * 'a t 
 *)

val cons : 'a -> 'a t -> 'a t
(** @since 4.11.0: val cons : 'a -> 'a t -> 'a t *)

val append : 'a t -> 'a t -> 'a t
(** @since 4.11.0: val append : 'a t -> 'a t -> 'a t *)

val unfold : ('b -> ('a * 'b) option) -> 'b -> 'a t
(** @since 4.11.0: val unfold : ('b -> ('a * 'b) option) -> 'b -> 'a t *)

val empty : 'a t
(** @since 4.07.0: val empty : 'a t *)

val return : 'a -> 'a t
(** @since 4.07.0: val return : 'a -> 'a t *)

val map : ('a -> 'b) -> 'a t -> 'b t
(** @since 4.07.0: val map : ('a -> 'b) -> 'a t -> 'b t *)

val filter : ('a -> bool) -> 'a t -> 'a t
(** @since 4.07.0: val filter : ('a -> bool) -> 'a t -> 'a t *)

val filter_map : ('a -> 'b option) -> 'a t -> 'b t
(** @since 4.07.0: val filter_map : ('a -> 'b option) -> 'a t -> 'b t *)

val flat_map : ('a -> 'b t) -> 'a t -> 'b t
(** @since 4.07.0: val flat_map : ('a -> 'b t) -> 'a t -> 'b t *)

val fold_left : ('a -> 'b -> 'a) -> 'a -> 'b t -> 'a
(** @since 4.07.0: val fold_left : ('a -> 'b -> 'a) -> 'a -> 'b t -> 'a *)

val iter : ('a -> unit) -> 'a t -> unit
(** @since 4.07.0: val iter : ('a -> unit) -> 'a t -> unit *)

end
