Skip to content

Fix mapcat docstring#1580

Closed
sogaiu wants to merge 1 commit intojanet-lang:masterfrom
sogaiu:fix-mapcat-docstring
Closed

Fix mapcat docstring#1580
sogaiu wants to merge 1 commit intojanet-lang:masterfrom
sogaiu:fix-mapcat-docstring

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