This commit is contained in:
nim-ka
2022-11-19 02:26:18 +00:00
parent 372a65cc51
commit 4ee438f8d6
8 changed files with 364 additions and 18 deletions

View File

@@ -102,6 +102,18 @@ load = function load() {
},
configurable: true
},
prod: {
value: function(val = 1) {
return this.reduce((a, b) => a * b, val)
},
configurable: true
},
cartProduct: {
value: function(that) {
return this.flatMap((e) => that.map((f) => [e, f]))
},
configurable: true
},
flatDeep: {
value: function() {
return this.flat(Infinity)