Data update

This commit is contained in:
Ingy döt Net 2026-04-30 12:34:36 -04:00
parent 4bb20c9b71
commit cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions

View file

@ -0,0 +1,12 @@
(let dotProduct (fun (v1 v2) {
(assert (= (len v1) (len v2)) "vectors should have the same length")
(mut result 0)
(mut i 0)
(while (< i (len v1)) {
(set result (+ result (* (@ v1 i) (@ v2 i))))
(set i (+ 1 i)) })
result }))
(print (dotProduct [1 3 -5] [4 -2 -1]))