Skip to content

Fix mapcat docstring #1580

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

Closed
wants to merge 1 commit into from
Closed

Conversation

sogaiu
Copy link
Contributor

@sogaiu sogaiu commented Apr 6, 2025

Sorry, I think I messed up the mapcat docstring.

The version that was merged recently says:

The resulting array has a length that is the shortest
of `ind` and each of `inds`.

but this doesn't necessarily hold, e.g.

(mapcat |(tuple ;$&) [:a :b] [:x :y :z] [0 1])
# =>
@[:a :x 0 :b :y 1]

I've substituted the following sentence in this PR:

Note that `f` is only applied to values at indeces up
to the largest index of the shortest of `ind` and each
of `inds`.

Hopefully this is more correct (^^;

@sogaiu sogaiu closed this Apr 6, 2025
@sogaiu sogaiu deleted the fix-mapcat-docstring branch April 6, 2025 11:44
@sogaiu sogaiu restored the fix-mapcat-docstring branch April 6, 2025 11:46
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.

1 participant