tsvm "compiler" update

This commit is contained in:
minjaesong
2025-12-18 10:29:46 +09:00
parent 4f6efbe000
commit 629ed5fb12
7 changed files with 323 additions and 6 deletions

View File

@@ -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)
}