package nel

  1. Overview
  2. Docs
On This Page
  1. Goal
A very simple implementation of a non-empty list

Install

dune-project
 Dependency

Authors

Maintainers

Sources

nel-1.0.0.tbz
sha256=9f9f48e19b42200a0c297dbe253a7987b4fa9d9a20138e1e8d52ad3328c7201f
sha512=4939e586c2364f7da203e8e03b8c4f1e6ba221c07cd8aac29acc99185d90ee8df30b0f988db9fa81c8b5b1bd6771eb6de2e47f0204e2b64f7c02a84fada40b15

doc/README.html

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.