mirror of
https://github.com/rjNemo/functional-programming-jargon
synced 2026-06-06 02:26:43 +00:00
Standardize and fix equality strictness in Setoid (#66)
This commit is contained in:
parent
a033852fca
commit
31544b98f6
1 changed files with 2 additions and 2 deletions
|
|
@ -471,11 +471,11 @@ Make array a setoid:
|
|||
```js
|
||||
Array.prototype.equals = (arr) => {
|
||||
var len = this.length
|
||||
if (len != arr.length) {
|
||||
if (len !== arr.length) {
|
||||
return false
|
||||
}
|
||||
for (var i = 0; i < len; i++) {
|
||||
if (this[i] !=== arr[i]) {
|
||||
if (this[i] !== arr[i]) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue