refactor: consolidate transducers, dissolve natives-parity.ss (jolt-jcs7)
natives-parity.ss was a grab-bag (its own header called it 'parity'). Dissolve it
into homes that say what they hold:
- cat -> natives-transduce.ss (was natives-xform.ss, renamed for the
whole transducer surface: volatiles + cat + transduce/sequence)
- transient? -> transients.ss
- rseq -> natives-seq.ss
- hash family -> natives-misc.ss (the public hash API over jolt-hash)
The remainder — the #?() feature set, the reader-conditional + re-matcher tagged-map
ctors, and macroexpand — is a coherent reader/macro runtime-support unit, kept as
natives-reader.ss (np- prefix -> nr-). rt.ss loads + two comment refs updated.
Runtime .ss, no re-mint. make test green; hash/transient?/rseq/cat/macroexpand and
#?() reader features all verified.
This commit is contained in:
parent
a594c9deb4
commit
960d8b6e24
9 changed files with 102 additions and 101 deletions
|
|
@ -213,3 +213,10 @@
|
|||
(def-var! "clojure.core" "partition" jolt-partition)
|
||||
(def-var! "clojure.core" "sort" jolt-sort)
|
||||
(def-var! "clojure.core" "identical?" jolt-identical?)
|
||||
|
||||
;; rseq: vectors + sorted colls only (Clojure), the reverse of the ascending seq.
|
||||
(define (jolt-rseq coll)
|
||||
(if (or (pvec? coll) (htable-sorted? coll))
|
||||
(list->cseq (reverse (seq->list (jolt-seq coll))))
|
||||
(jolt-throw (jolt-ex-info "rseq requires a vector or sorted collection" (jolt-hash-map)))))
|
||||
(def-var! "clojure.core" "rseq" jolt-rseq)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue