effect-io-ai

Package: effect
Module: Chunk

Chunk.of

Builds a NonEmptyChunk from a single element.

Example (Creating a single-element chunk)

import { Chunk } from "effect"

const chunk = Chunk.of("hello")
console.log(Chunk.toArray(chunk)) // ["hello"]

Signature

declare const of: <A>(a: A) => NonEmptyChunk<A>

Source

Since v2.0.0