jon.recoil.org

Module Nonempty_list.Partition3Source

A Partition3 represents a splitting of a nonempty list into three parts, a "fst", a "snd", and a "trd" part.

Unlike List, partitioning a nonempty list does not produce three nonempty lists, because one of the parts could be empty. However, we know for sure that at least one of the parts is nonempty, so we represent this information in a structured type indicating which parts are nonempty.

include sig ... end
Sourceval sexp_of_t : ('fst -> Sexplib0.Sexp.t) -> ('snd -> Sexplib0.Sexp.t) -> ('trd -> Sexplib0.Sexp.t) -> ('fst, 'snd, 'trd) Base.Nonempty_list.Partition3.t -> Sexplib0.Sexp.t