Sitelet https://github.com/Hi-Folks/array/pull/45
Skip to content

Allow flatMap to support multidimensional arrays - #45

Merged
roberto-butti merged 2 commits into
Hi-Folks:mainfrom
RoadSigns:main
Oct 2, 2022
Merged

roberto-butti merged 2 commits into
Hi-Folks:mainfrom
RoadSigns:main

Conversation

@RoadSigns

@RoadSigns RoadSigns commented Oct 2, 2022 •

Copy link
Copy Markdown
Contributor

This will allow users to use the flatMap method when they have multidimensional arrays.

Currently if the array contains other arrays then the method throws the following error:

 Unsupported operand types: array * int

This will now run the callback on the array element within the element and then flatten it.

@roberto-butti

Copy link
Copy Markdown
Contributor

Thank you @RoadSigns the PR is completed on your side ?

@RoadSigns

Copy link
Copy Markdown
Contributor Author

If you are happy with the code review then it can 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants