Preface_stdlib.Nonempty_listSourceImplementation for Nonempty_list.t.
A Nonempty_list.t is a list that contains at least one element. Therefore, the head and tails functions are total and safe.
module Functor : Preface_specs.FUNCTOR with type 'a t = 'a tmodule Alt : Preface_specs.ALT with type 'a t = 'a tNonempty_list.t implements Preface_specs.APPLICATIVE and introduces an interface to define Preface_specs.TRAVERSABLE using Nonempty_list as an iterable structure.
module Applicative :
Preface_specs.Traversable.API_OVER_APPLICATIVE with type 'a t = 'a tmodule Selective : Preface_specs.SELECTIVE with type 'a t = 'a tNonempty_list.t implements Preface_specs.MONAD and introduces an interface to define Preface_specs.TRAVERSABLE using Nonempty_list as an iterable structure.
module Monad : Preface_specs.Traversable.API_OVER_MONAD with type 'a t = 'a tmodule Comonad : Preface_specs.COMONAD with type 'a t = 'a tmodule Foldable : Preface_specs.FOLDABLE with type 'a t = 'a tBy setting the inner type type of Nonempty_list.t it is possible to get implementations for abstractions twithout type parameter.
Additional functions to facilitate practical work with Nonempty_list.t.
rev_append a b is a tail-recursive version of append (rev a) b.
Formatter for pretty-printing for Nonempty_list.t.