Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

concat on maps issue #871

Closed
ikappaki opened this issue Feb 14, 2024 · 0 comments · Fixed by #872
Closed

concat on maps issue #871

ikappaki opened this issue Feb 14, 2024 · 0 comments · Fixed by #872
Labels
issue-type:enhancement New feature or request lang Issue pertaining to Basilisp language modules

Comments

@ikappaki
Copy link
Contributor

Hi,

concat on maps wrongly concatenates the map keys rather that the key value pairs.

To reproduce.

  1. Open up the REPL and concatenate a couple of one item maps, it returns back the list of keys rather than the key value pairs
basilisp.user=> (concat {:a 1} {:b 2})
(:a :b)

Contrast this with Clojure

user> (concat {:a 1} {:b 2})
([:a 1] [:b 2])

PR to follow.

chrisrink10 pushed a commit that referenced this issue Feb 15, 2024
…872)

Hi,

could you please consider patch to have `concat` on maps return k/v
pairs instead of keys. It fixes #871.

The issue as I understand it that the underlying map library iterates
over keys rather than k/v pairs, and thus it needs to be converted first
to a sequence (which correctly converts map into a seq of pairs).

Thanks

---------

Co-authored-by: ikappaki <ikappaki@users.noreply.github.com>
@chrisrink10 chrisrink10 added this to the Release v0.1.0 milestone Feb 22, 2024
@chrisrink10 chrisrink10 added issue-type:enhancement New feature or request lang Issue pertaining to Basilisp language modules labels Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue-type:enhancement New feature or request lang Issue pertaining to Basilisp language modules
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants