Hyperlinkv0.8.0-beta.28

Chunk

Chunk.fromIterableconsteffect/Chunk.ts:353
<A>(self: Iterable<A>): Chunk<A>

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]
constructors
Source effect/Chunk.ts:3532 lines
export const fromIterable = <A>(self: Iterable<A>): Chunk<A> =>
  isChunk(self) ? self : fromArrayUnsafe(RA.fromIterable(self))
Referenced by 6 symbols