effect-io-ai

Package: effect
Module: Chunk

Chunk.fromIterable

Creates a new Chunk from an iterable collection of values.

Example (Creating chunks from iterables)

import { Chunk } from "effect"

const chunk = Chunk.fromIterable([1, 2, 3])
console.log(Chunk.toArray(chunk)) // [1, 2, 3]

Signature

declare const fromIterable: <A>(self: Iterable<A>) => Chunk<A>

Source

Since v2.0.0