package qcheck

  1. Overview
  2. Docs

Iterators

Compatible with the library "sequence". An iterator i is simply a function that accepts another function f (of type 'a -> unit) and calls f on a sequence of elements f x1; f x2; ...; f xn.

type 'a t = ('a -> unit) -> unit
val empty : 'a t
val return : 'a -> 'a t
val (<*>) : ('a -> 'b) t -> 'a t -> 'b t
val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
val map : ('a -> 'b) -> 'a t -> 'b t
val map2 : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t
val (>|=) : 'a t -> ('a -> 'b) -> 'b t
val append : 'a t -> 'a t -> 'a t
val (<+>) : 'a t -> 'a t -> 'a t

Synonym to append.

val of_list : 'a list -> 'a t
val of_array : 'a array -> 'a t
val pair : 'a t -> 'b t -> ('a * 'b) t
val triple : 'a t -> 'b t -> 'c t -> ('a * 'b * 'c) t
val quad : 'a t -> 'b t -> 'c t -> 'd t -> ('a * 'b * 'c * 'd) t
val find : ('a -> bool) -> 'a t -> 'a option
OCaml

Innovation. Community. Security.