feat(Tuples): Add Tuples.Flatten#130
Closed
airismadeupofair wants to merge 312 commits into
Closed
Conversation
fix(strings): fix string case and add more tests
fix(equality): improve equality for numbers and strings
feat(tuples): make sort generic
docs: add initial docusaurus sub-project
This optimization makes use of a self-memoizing cache in the string length algorithm which allows it to run on a logarithmic time scale. This allows us to get the length of strings that are up to 9999 characters long performantly without freezing the language server.
core: try a slightly different function encoding
feat: add reverse
Fix for ts bundler
c993a03 to
a78a748
Compare
add flatten's impl with its doc, and exports with doc
peel type didnt properly unflatten variadadic tuples with rest element at the start
003c189 to
316f8c6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello,
Firstly thank you for this very powerful library 👍.
but i found a small limitation within the
Tuplesnamespacethere was no flatten. so i made one.
it can handle depths way over 20. and can handle over 1000 items at once.
it can even handle spreads properly including the array of a tuple spread case.
these are some of the test cases that passed on github actions.
note:
the implementation is 94 KB. it is large but almost 84KB is generated by scripts. however this is the cost for optimisation as standard recursion for the main utilites that are used by the Flatten caused the instantiation count to explode.