Package: effect
Module: Array
Change the head, creating a new NonEmptyReadonlyArray.
Example
import { Array } from "effect"
const result = Array.setNonEmptyHead([1, 2, 3], 10)
console.log(result) // [10, 2, 3]
Signature
declare const setNonEmptyHead: { <B>(b: B): <A>(self: NonEmptyReadonlyArray<A>) => NonEmptyArray<A | B>; <A, B>(self: NonEmptyReadonlyArray<A>, b: B): NonEmptyArray<A | B>; }
Since v2.0.0