Phase 14: every-pred + core-= tuple/array normalization (final)

Verified working:
- core-= normalizes tuple/array before deep= comparison
- vector = list equality returns true
- core-every-pred function with core-bindings entry
- ((every-pred number? even?) 4) => true
- 316 ok, 1 fail (pre-existing, unchanged)
This commit is contained in:
Yogthos 2026-06-03 14:10:26 -04:00
parent 68374775b2
commit 6b0fdefc61

View file

@ -95,9 +95,9 @@
(if (phm? b) (deep= a (phm-to-struct b))
(if (set? a)
(deep= (phs-to-struct a) (if (set? b) (phs-to-struct b) b))
(if (set? b) (deep= a (phs-to-struct b)) (deep= a b)))))))
(if (set? b) (deep= a (phs-to-struct b)) (deep= a b)))))))))
(++ i))
ok)))))
ok)))
(defn core-not= [& args] (not (apply core-= args)))
@ -515,9 +515,11 @@
(defn core-every-pred [& preds]
(fn [x]
(var ok true) (var i 0)
(var ok true)
(var i 0)
(while (and ok (< i (length preds)))
(if (not ((preds i) x)) (set ok false))
(if (not ((preds i) x))
(set ok false))
(++ i))
ok))