Skip to content

feat: add Array.rep#7290

Open
ElectricalBoy wants to merge 6 commits intomainfrom
copyRepeatedElementArray
Open

feat: add Array.rep#7290
ElectricalBoy wants to merge 6 commits intomainfrom
copyRepeatedElementArray

Conversation

@ElectricalBoy
Copy link
Collaborator

@ElectricalBoy ElectricalBoy commented Mar 23, 2026

Summary

This PR adds Array.rep that creates an array with count copies of the specified element.

How did you test this change?

included tests

@ElectricalBoy ElectricalBoy requested review from a team March 23, 2026 01:08
Copy link
Collaborator

@hjpalpha hjpalpha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code wise lgtm

not sure about the name
maybe (IF OTHERS AGREE)just name it .rep analogous to string.rep which basically does the same for strings?

@ElectricalBoy
Copy link
Collaborator Author

yeah Array.rep sounds like a better name
originally planned for Array.repeat until Lua started screaming because repeat is a keyword

@ElectricalBoy ElectricalBoy changed the title feat: add Array.createRepeatedElementArray feat: add Array.rep Mar 23, 2026
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