Add a `map!` method for a `Tuple` source #63528
All Vouch review confidence checks passed
Residual risk 0.15 = Change Risk (0.38) × (1 − Review Confidence (0.62)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.38 · 68 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.35 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.253
Real PR Conversation Timeline
2 items
Changes Requested
I think map! needs broader fixes that should just make it work with any iterable. also note that this function only defines two-arg map!(_, _) but it's supposed to work with varargs.
adienes
albertomercurio
The docstring of
map!saysmap!(function, destination, collection...), but aTuplecollection was aMethodError, whilemapaccepts it.The new method uses
foldl, which is unrolled for aTuple, so it does not allocate when the elements have different types. It has the semantics of the array method: results are written in order,fis called once per element written, it stops at the end ofdest, and the rest ofdestis untouched.Only the one-source case is added: the
N-sourcemap_n!cannot accept aTupleas is, sinceLinearIndices(x)treats it as an array size.Closes #63526