Skip to content

Conversation

@giodamelio
Copy link

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 lists
  • list.toTuple - converts lists to tuples
  • tuple.toList - converts tuples back to lists

Let me know if there is anything you want me to change, or if you just don't want one or more functions added!

Giovanni d'Amelio 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
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