(collection: Iterable<Order<A>>)
| 158 | * @since 2.0.0 |
| 159 | */ |
| 160 | export 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 |
no test coverage detected