js-on-sx: reduce/reduceRight callback receives (acc, cur, idx, array)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 27s

This commit is contained in:
2026-05-09 19:13:12 +00:00
parent 0655b942a5
commit d4be87166b
2 changed files with 12 additions and 2 deletions

View File

@@ -2624,7 +2624,11 @@
(cond
((>= i (len arr)) acc)
(else
(js-list-reduce-loop f (f acc (nth arr i)) arr (+ i 1))))))
(js-list-reduce-loop
f
(js-call-with-this js-undefined f (list acc (nth arr i) i arr))
arr
(+ i 1))))))
(define
js-list-find-loop
@@ -2773,7 +2777,11 @@
(if
(< i 0)
acc
(js-list-reduce-right-loop f (f acc (nth arr i)) arr (- i 1)))))
(js-list-reduce-right-loop
f
(js-call-with-this js-undefined f (list acc (nth arr i) i arr))
arr
(- i 1)))))
(define
js-list-keys-loop