Tuple additions: tuple.toAttrset, tuple.toList, list.toTuple#71
Open
giodamelio wants to merge 2 commits intochessai:masterfrom
Open
Tuple additions: tuple.toAttrset, tuple.toList, list.toTuple#71giodamelio wants to merge 2 commits intochessai:masterfrom
giodamelio wants to merge 2 commits intochessai:masterfrom
Conversation
added 2 commits
August 19, 2025 14:34
- list.toTuple: Convert lists to tuples (max 10 elements) - tuple.toList: Convert tuples to lists (max 10 elements) - Both functions include comprehensive tests including error conditions
Convert lists to tuples and tuples to lists. Enforces max length
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.
First off thanks for making this. It has been super handy for me this last while.
I have been using tuples in my config and wrote up a few helper functions that I have found handy, so I figured I would send them your way.
tuple.toAttrset- converts tuples to attribute sets using custom key listslist.toTuple- converts lists to tuplestuple.toList- converts tuples back to listsLet me know if there is anything you want me to change, or if you just don't want one or more functions added!