MCPcopy Create free account
hub / github.com/Effect-TS/effect / takeAll

Function takeAll

packages/effect/src/TxPriorityQueue.ts:418–422  ·  view source on GitHub ↗
(self: TxPriorityQueue<A>)

Source from the content-addressed store, hash-verified

416 * @since 2.0.0
417 */
418export const takeAll = <A>(self: TxPriorityQueue<A>): Effect.Effect<Array<A>> =>
419 Effect.map(
420 TxRef.modify(self.ref, (chunk) => [chunk, C.empty()]),
421 C.toArray
422 )
423
424/**
425 * Tries to take the smallest element. Returns `None` if the queue is empty.

Callers

nothing calls this directly

Calls 2

modifyMethod · 0.65
mapMethod · 0.45

Tested by

no test coverage detected