(collection: Iterable<Order<A>>)
| 397 | * @since 2.0.0 |
| 398 | */ |
| 399 | export function combineAll<A>(collection: Iterable<Order<A>>): Order<A> { |
| 400 | return make((a1, a2) => { |
| 401 | let out: Ordering = 0 |
| 402 | for (const O of collection) { |
| 403 | out = O(a1, a2) |
| 404 | if (out !== 0) { |
| 405 | return out |
| 406 | } |
| 407 | } |
| 408 | return out |
| 409 | }) |
| 410 | } |
| 411 | |
| 412 | /** |
| 413 | * Transforms an `Order` on type `A` into an `Order` on type `B` by providing a function that |