Mental Model
Array<A>is a standard JS array. All functions return new arrays; the input is never mutated.NonEmptyArray<A>is[A, ...Array<A>]— guaranteed to have at least one element.- Most functions are dual — callable as
Array.fn(array, arg)(data-first) orpipe(array, Array.fn(arg))(data-last). - Functions that access elements by index return
Option<A>for safety. - Set-like operations use
Equal.equivalence()by default; use*Withvariants for custom equality.
Key Operations
Create
Build arrays from values, ranges, or generators:Access
Safely retrieve elements withOption:
