mirror of
https://github.com/curioustorvald/tsvm.git
synced 2026-03-07 11:51:49 +09:00
tsvm "compiler" update
This commit is contained in:
@@ -375,6 +375,9 @@ Array.prototype.shuffle = function() {
|
||||
|
||||
return this;
|
||||
}
|
||||
Array.prototype.shuffled = function() {
|
||||
return this.slice(0).shuffle()
|
||||
}
|
||||
Array.prototype.sum = function(selector) {
|
||||
return this.reduce((acc,val) => acc + ((selector === undefined) ? val : selector(val)), 0)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user