(collection: Iterable<Equivalence<A>>)
| 145 | * @since 2.0.0 |
| 146 | */ |
| 147 | export const all = <A>(collection: Iterable<Equivalence<A>>): Equivalence<ReadonlyArray<A>> => { |
| 148 | return make((x, y) => { |
| 149 | const len = Math.min(x.length, y.length) |
| 150 | |
| 151 | let collectionLength = 0 |
| 152 | for (const equivalence of collection) { |
| 153 | if (collectionLength >= len) { |
| 154 | break |
| 155 | } |
| 156 | if (!equivalence(x[collectionLength], y[collectionLength])) { |
| 157 | return false |
| 158 | } |
| 159 | collectionLength++ |
| 160 | } |
| 161 | return true |
| 162 | }) |
| 163 | } |
| 164 | |
| 165 | /** |
| 166 | * @category combining |
no test coverage detected