Hyperlinkv0.8.0-beta.28

Array

<A>(a: A): NonEmptyArray<A>

Wraps a single value in a NonEmptyArray.

Example (Creating a single-element array)

import { Array } from "effect"

console.log(Array.of(1)) // [1]
constructorsmakeempty
Source effect/Array.ts:33471 lines
export const of = <A>(a: A): NonEmptyArray<A> => [a]
Referenced by 31 symbols