package choice

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

Module Choice.EnumSource

Sourcetype 'a t

Enumerate values of type 'a, with a choice point for each value

Sourcetype 'a item =
  1. | End
  2. | Item of 'a * 'a t
Sourceval next : 'a t -> 'a item choice

choose the next element

Sourceval empty : 'a t

Empty iterator

Sourceval cons : 'a choice -> 'a t -> 'a t

Add an element at the head of the list

Sourceval cons1 : 'a -> 'a t -> 'a t

deterministic cons

Sourceval of_list : 'a list -> 'a t

Simply enumerate the elements of the list

Sourceval zip : 'a t -> 'b t -> ('a * 'b) t

Combine every element of the first enumeration with every element at the same position in the second enumeration. The result always ends at soon as one of the enumeration ends

Sourceval count : _ t -> int

Number of distincts enumerations

Sourceval to_lists : 'a t -> 'a list choice

Conversion to a choice of lists

Sourceval to_list_list : 'a t -> 'a list list

Conversion to a list of possibilies

OCaml

Innovation. Community. Security.