Skip to content

Conversation

@jfhamlin
Copy link
Contributor

@jfhamlin jfhamlin commented Dec 8, 2025

Implements IReduce and IReduceInit interfaces for MapKeySeq to fix "No method in multimethod 'coll-reduce' for dispatch value: *lang.MapKeySeq" error when using mapv on map keys.

Changes:

  • Add Reduce and ReduceInit methods to MapKeySeq in pkg/lang/persistentarraymap.go
  • Add interface assertions for IReduce and IReduceInit compliance
  • Add comprehensive test cases in test/glojure/test_glojure/basic.glj

Fixes issue where operations like (mapv identity (keys some-map)) would fail due to missing reduce implementation.

Fixes #125

Implements IReduce and IReduceInit interfaces for MapKeySeq to fix
"No method in multimethod 'coll-reduce' for dispatch value: *lang.MapKeySeq"
error when using mapv on map keys.

Changes:
- Add Reduce and ReduceInit methods to MapKeySeq in pkg/lang/persistentarraymap.go
- Add interface assertions for IReduce and IReduceInit compliance
- Add comprehensive test cases in test/glojure/test_glojure/basic.glj

Fixes issue where operations like (mapv identity (keys some-map)) would fail
due to missing reduce implementation.
@jfhamlin jfhamlin merged commit 04434d0 into main Dec 8, 2025
2 checks passed
@jfhamlin jfhamlin deleted the fix/map-key-seq-reduce-issue-125 branch December 8, 2025 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No method in multimethod 'coll-reduce' for dispatch value: *lang.MapKeySeq

2 participants