{
  "id": 11252054,
  "title": "Lists that keep track of their reversal",
  "url": "https://urgent.news/2026/10/01/lists-that-keep-track-of-their-reversal",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-10-01T16:29:04.000Z",
  "source": {
    "name": "Lobsters",
    "slug": "lobsters",
    "url": "https://grim.cargocut.org/a/rev-list.html"
  },
  "original_language": "en",
  "account": "The article discusses the nel package, a tiny library for describing non-empty lists in OCaml, which can serve as an error buffer for the Pidgin library in the context of applicative validation. The purpose of non-empty lists is to ensure that there is at least one element in the list, thanks to the semigroup nature of non-empty lists. While the implementation is straightforward, it illustrates the desire for more invariants for common constructs like lists. The author explores Antonin Décimo's proposal to track the construction order in the type of a potential list, which could help enforce the presence of at least one element in the list. The author also presents a few ideas for implementing this concept in OCaml, using GADTs to encode constraints on type parameters through constructors.",
  "summary": null,
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}