* @since 4.0.0
(item: Equivalence<A>)
| 558 | * @since 4.0.0 |
| 559 | */ |
| 560 | function Array_<A>(item: Equivalence<A>): Equivalence<ReadonlyArray<A>> { |
| 561 | return make((self, that) => { |
| 562 | if (self.length !== that.length) return false |
| 563 | |
| 564 | for (let i = 0; i < self.length; i++) { |
| 565 | if (!item(self[i], that[i])) return false |
| 566 | } |
| 567 | |
| 568 | return true |
| 569 | }) |
| 570 | } |
| 571 | export { |
| 572 | /** |
| 573 | * Creates an equivalence for arrays where all elements are compared using the same equivalence. |