Data update

This commit is contained in:
Ingy döt Net 2025-08-11 18:05:26 -07:00
parent 4d5544505c
commit 4924dd0264
3073 changed files with 55820 additions and 4408 deletions

View file

@ -0,0 +1,7 @@
(import std.List :reduce :foldLeft)
(let sum (fun (a b) (+ a b)))
(assert (= 10 (reduce [1 2 3 4] sum)) "reduce array to 10")
(assert (= 10 (foldLeft [1 2 3 4] 0 sum)) "fold array to 10")
(assert (= 12 (foldLeft [1 2 3 4] 2 sum)) "fold array to 12 with initial value")