Module Basics.NEL

Representation for non-empty lists

type 'a t =
  1. | One of 'a
  2. | :: of 'a * 'a t
val compare_lazy : ('a -> 'b -> int) -> 'a t -> 'b t -> int
val compare : ('a -> 'b -> int) -> 'a t -> 'b t -> int
val equal : ('a -> 'b -> bool) -> 'a t -> 'b t -> bool
val hd : 'a t -> 'a
val last : 'a t -> 'a
val fold_left : f:('a -> 'b -> 'a) -> 'a -> 'b t -> 'a
val of_list : 'a list -> 'a t
val to_list : 'a t -> 'a list
val rev : 'a t -> 'a t
val (@) : 'a t -> 'a t -> 'a t
val rev_to_list : 'a t -> 'a list
val of_rev_list : 'a list -> 'a t
val map : f:('a -> 'b) -> 'a t -> 'b t
val exists : f:('a -> bool) -> 'a t -> bool
val pp : ?fsep:Pretty.simple -> ?fopen:Pretty.simple -> ?fclose:Pretty.simple -> 'a Pretty.printer -> Stdlib.Format.formatter -> 'a t -> unit