Phase 5: HAMT Persistent Map + Persistent Set, 86 tests pass
- T5.3: HAMT Persistent Map (lib/cljnim_pmap.nim)
O(log32 n) assoc/dissoc/get with structural sharing
16 unit tests, ckMap migrated from seq to HAMT
- T5.4: Persistent Set backed by HAMT map
ckSet with conj/disj/contains?/get, set literal #{}
- Fix: cljContains/cljCount return CljVal (not bool/int)
- Fix: equality in generics via explicit cljEq parameter
- Updated roadmap, task board, CI/Makefile
This commit is contained in:
+5
-6
@@ -46,19 +46,19 @@
|
||||
|
||||
## Phase 5: Persistent Data Structures
|
||||
- [x] Persistent Vector (Hash Array Mapped Trie, 32-way branching)
|
||||
- [ ] Persistent Map (HAMT)
|
||||
- [ ] Persistent Set
|
||||
- [x] Persistent Map (HAMT) — `pmapAssoc`, `pmapDissoc`, `pmapGet` in O(log₃₂ n)
|
||||
- [x] Persistent Set — backed by HAMT map, `conj`/`disj`/`contains?`/`get`
|
||||
- [x] `conj`, `assoc`, `dissoc`, `get`, `get-in`
|
||||
- [x] `nth`, `first`, `rest`, `last`, `count` on persistent collections
|
||||
- [ ] Transients for batch mutations
|
||||
|
||||
## Phase 6: Clojure Core Library
|
||||
- [ ] `range`, `repeat`, `cycle`, `iterate`
|
||||
- [ ] `take`, `drop`, `partition`, `interleave`, `concat`
|
||||
- [ ] `str`, `pr-str`, `println`, `prn`
|
||||
- [x] `take`, `drop`, `partition`, `interleave`, `concat`
|
||||
- [x] `str`, `pr-str`, `println`, `prn`
|
||||
- [ ] `slurp`, `spit`, `read-line`
|
||||
- [ ] `meta`, `with-meta`, `vary-meta`
|
||||
- [ ] `type`, `instance?`, `satisfies?`
|
||||
- [x] `type`, `instance?`, `satisfies?`
|
||||
|
||||
## Phase 7: Project Compilation
|
||||
- [ ] Compile entire projects (not just single files)
|
||||
@@ -79,4 +79,3 @@
|
||||
## Known Issues
|
||||
- `->>` threading macro with nested `map`/`reduce` requires proper macro expansion context
|
||||
- REPL definitions are re-compiled from scratch on each evaluation (slow but correct)
|
||||
- No true persistent data structures yet (runtime uses Nim seq/tables)
|
||||
|
||||
Reference in New Issue
Block a user