core: move not-any?/not-every? to the Clojure overlay (jolt-1j0 phase 2)

First pure-fn migration batch. Both are leaf fns (no internal Janet callers);
the Clojure defs (not . some / not . every?) match the prior Janet behavior.
Removed the core-* defns and their core-bindings entries.

conformance 218/218 x3, clojure-test-suite 3927, core-bench 2340ms vs 2336ms
baseline (noise).
This commit is contained in:
Yogthos 2026-06-06 23:01:25 -04:00
parent 6282ef0a39
commit 16cd617bd6
2 changed files with 4 additions and 10 deletions

View file

@ -61,3 +61,7 @@
(defn some-fn [& preds]
(fn [& xs] (some (fn [p] (some p xs)) preds)))
(defn not-any? [pred coll] (not (some pred coll)))
(defn not-every? [pred coll] (not (every? pred coll)))

View file

@ -3231,14 +3231,6 @@
# keys must be numbers (NaN allowed) — like Clojure, which compares them with </>.
# min-key / max-key now live in the Clojure collection tier (core/20-coll.clj).
(defn core-not-every? [pred coll]
(def pred (as-fn pred))
(not (do (var ok true) (each x (realize-for-iteration coll) (when (not (truthy? (pred x))) (set ok false))) ok)))
(defn core-not-any? [pred coll]
(def pred (as-fn pred))
(do (var none true) (each x (realize-for-iteration coll) (when (truthy? (pred x)) (set none false))) none))
(defn core-vary-meta [obj f & args]
(let [m (core-meta obj)] (core-with-meta obj (apply f m args))))
@ -3807,8 +3799,6 @@
"ifn?" core-ifn?
"indexed?" core-indexed?
"distinct?" core-distinct?
"not-every?" core-not-every?
"not-any?" core-not-any?
"vary-meta" core-vary-meta
"ex-info" core-ex-info
"ex-data" core-ex-data