MCPcopy Index your code
hub / github.com/Effect-TS/effect / chunkArbitrary

Function chunkArbitrary

packages/effect/src/Schema.ts:8243–8246  ·  view source on GitHub ↗
(item: LazyArbitrary<A>, ctx: ArbitraryGenerationContext)

Source from the content-addressed store, hash-verified

8241
8242const chunkArbitrary =
8243 <A>(item: LazyArbitrary<A>, ctx: ArbitraryGenerationContext): LazyArbitrary<chunk_.Chunk<A>> => (fc) => {
8244 const items = fc.array(item(fc))
8245 return (ctx.depthIdentifier !== undefined ? fc.oneof(ctx, fc.constant([]), items) : items).map(chunk_.fromIterable)
8246 }
8247
8248const chunkPretty = <A>(item: pretty_.Pretty<A>): pretty_.Pretty<chunk_.Chunk<A>> => (c) =>
8249 `Chunk(${chunk_.toReadonlyArray(c).map(item).join(", ")})`

Callers

nothing calls this directly

Calls 3

itemFunction · 0.85
arrayMethod · 0.80
mapMethod · 0.65

Tested by

no test coverage detected