Skip to content

feat(stdlib): reverse a tuple of up to twelve elements 🔄 - #580

Merged
timfennis merged 1 commit into
masterfrom
feature/reversed-tuples
Dec 1, 2026
Merged

timfennis merged 1 commit into
masterfrom
feature/reversed-tuples

Conversation

@timfennis

Copy link
Copy Markdown
Owner

reversed took lists and strings but not tuples, so swapping a pair such as a map entry (k, v) or a point (x, y) meant writing the tuple out again.

  • reversed now takes a tuple of 2 to 12 elements and gives a new tuple with the elements in reverse order, each keeping its own type: (1, "a").reversed is a (String, Int).
  • A variadic signature can't express "the elements backwards", so each length gets its own overload, as each length of zip does. The limit of twelve, shared with zip as LONGEST, follows Rust's standard library.
  • The manual's tuple page shows reversed, including map(reversed) over a list of pairs.

Written with AI (Claude Code), all of it.

🤖 Generated with Claude Code

Co-authored-by: Claude Opus 5.5 noreply@anthropic.com

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-01T06:12:44.940960Z d4b078c PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@timfennis
timfennis merged commit b6e96d4 into master Dec 1, 2026
1 check passed
@timfennis
timfennis deleted the feature/reversed-tuples branch December 1, 2026 06:12
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