package nel

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

Nel

Until non-empty lists are included in the standard library, this rather naive implementation should do the trick. Currently the goal of the API is not to be complete but to follow our current usages.

Why not using ocaml-non-empty-list? Although the implementation is more than reasonable, it relies on Base, which we feel is too much to expect for small projects.

Goal

Non-empty lists are often used to characterize the result of a validation, where the error case, in which the list is empty, does not make sense. The purpose of this portable library is therefore to serve this purpose.