MCPcopy
hub / github.com/Effect-TS/effect / all

Function all

packages/effect/src/Order.ts:160–176  ·  view source on GitHub ↗
(collection: Iterable<Order<A>>)

Source from the content-addressed store, hash-verified

158 * @since 2.0.0
159 */
160export const all = <A>(collection: Iterable<Order<A>>): Order<ReadonlyArray<A>> => {
161 return make((x, y) => {
162 const len = Math.min(x.length, y.length)
163 let collectionLength = 0
164 for (const O of collection) {
165 if (collectionLength >= len) {
166 break
167 }
168 const o = O(x[collectionLength], y[collectionLength])
169 if (o !== 0) {
170 return o
171 }
172 collectionLength++
173 }
174 return 0
175 })
176}
177
178/**
179 * @category combining

Callers 3

Order.tsFile · 0.70
tupleFunction · 0.70
httpRouter.tsFile · 0.50

Calls 1

makeFunction · 0.70

Tested by

no test coverage detected