This commit is contained in:
Daniel D. Zhang 2016-08-27 23:18:38 -07:00 committed by hemanth.hm
parent eb4481cac9
commit 6256c79347

View file

@ -76,10 +76,10 @@ console.log(arity); // 2
A function which takes a function as an argument and/or returns a function.
```js
const filter = (pred, xs) => {
const filter = (predicate, xs) => {
const result = [];
for (let idx = 0; idx < xs.length; idx++) {
if (pred(xs[idx])) {
if (predicate(xs[idx])) {
result.push(xs[idx]);
}
}