Skip to content

feat(Tuples): add Repeat#127

Closed
airismadeupofair wants to merge 4 commits into
gvergnaud:mainfrom
airismadeupofair:feat/tuples-repeat
Closed

feat(Tuples): add Repeat#127
airismadeupofair wants to merge 4 commits into
gvergnaud:mainfrom
airismadeupofair:feat/tuples-repeat

Conversation

@airismadeupofair

Copy link
Copy Markdown

Hello!

I’ve been using Hotscript for a library and noticed a missing utility for repeating items into a tuple. I ended up with (and now want to contribute) an implementation that can handle large counts (well over 1,000) with low recursion depth ($$O(\log_{10}(n))$$ (the impl proves it).

It’s also very small (about 36 lines including formatting).

Usage:

type Test0 = Call<Tuples.Repeat<never>, 10> 
// [never, never, never, never, never, never, never, never, never, never]

I have also added documentation as JSDOC and into the README.md

@airismadeupofair airismadeupofair closed this by deleting the head repository May 14, 2026
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