Lift a plain array into a NonEmptyArray, returning none when it is empty.
const maybeItems = fromArray(cart.items) if (maybeItems.some) checkout(maybeItems.value) Copy
const maybeItems = fromArray(cart.items) if (maybeItems.some) checkout(maybeItems.value)
Lift a plain array into a NonEmptyArray, returning none when it is empty.