non_empty_list
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!
Installation
This package can be added to your Gleam project:
gleam add non_empty_list
and its documentation can be found at https://hexdocs.pm/non_empty.
Usage
Import the non_empty_list
module and write some code!
import non_empty_list
import gleam/int
import gleam/io
pub fn main() {
non_empty_list.new(1, [2, 3, 4])
|> non_empty_list.scan(fn(n, m) { n + m })
|> int.to_string
|> io.println
}