Package Version Hex Docs

Non-empty lists in Gleam ✨

This package exposes many functions to work on non-empty lists. If you think there’s a missing functions you’d love to have, open an issue!


This package can be added to your Gleam project:

gleam add non_empty_list

and its documentation can be found at


Import the non_empty_list module and write some code!

import non_empty_list
import gleam/int
import gleam/io

pub fn main() {, [2, 3, 4])
  |> non_empty_list.scan(fn(n, m) { n + m })
  |> int.to_string
  |> io.println 
Search Document