Module Util_pure.List

type 'a t = 'a Stdlib.List.t
val sngl : 'a -> 'a t
val iter_flip : 'a t -> ('a -> unit) -> unit
val map_flip : 'a t -> ('a -> 'b) -> 'b t
val flatmap : ('a -> 'b t) -> 'a t -> 'b t
val of_table : ('a, 'b) BatMap_real.t -> ('a * 'b) t
val to_table : ('a * 'b) t -> ('a, 'b) BatMap_real.t
val repeat_f : int -> (unit -> 'a) -> 'a t
val repeat : int -> 'a -> 'a t

The opposite of cons, and reversed: `unsnoc a; b; c` gives `(a; b, c)`. Throws on empty list.

val unsnoc : 'a t -> 'a t * 'a

The opposite of cons, and reversed: `unsnoc a; b; c` gives `(a; b, c)`. Throws on empty list.

Given a function g and a list of functions fs, find the first one for which g (f ()) is true, and return Some (f ()). If none of them match, return None.

val find_f : ('a -> bool) -> (unit -> 'a) t -> 'a option

Given a function g and a list of functions fs, find the first one for which g (f ()) is true, and return Some (f ()). If none of them match, return None.