adding dejong example and reduce

This commit is contained in:
Quentin Leonetti
2019-07-14 07:40:20 +02:00
parent cb1aff02e4
commit 530264742a
2 changed files with 26 additions and 17 deletions

View File

@@ -70,6 +70,10 @@ function Library (ronin) {
return arr.filter(fn)
}
this.reduce = (fn, arr, acc = 0) => {
return arr.reduce(fn, acc)
}
this.first = (arr) => {
return arr[0]
}