MCPcopy Create free account
hub / github.com/effect-app/libs / toArray

Function toArray

packages/effect-app/src/Set.ts:103–109  ·  view source on GitHub ↗
(O: Order.Order<A>)

Source from the content-addressed store, hash-verified

101 * Convert a set to an Array
102 */
103export function toArray<A>(O: Order.Order<A>): (set: Set<A>) => ReadonlyArray<A> {
104 return (x) => {
105 const r: Array<A> = []
106 x.forEach((e) => r.push(e))
107 return r.sort(O)
108 }
109}
110
111/**
112 * Convert a set to an Array

Callers 3

toArray_Function · 0.70
reduce_Function · 0.70
make_Function · 0.70

Calls 2

pushMethod · 0.80
forEachMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…