From 6d15697edce2217a2bbc82def26262d18dac6373 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Wed, 21 May 2025 14:25:45 -0400 Subject: Added Set infix operations, as well as Table.with_fallback() and fixed some bugs with update assignment. --- api/sets.yaml | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'api/sets.yaml') diff --git a/api/sets.yaml b/api/sets.yaml index 6bf0d8cc..08111932 100644 --- a/api/sets.yaml +++ b/api/sets.yaml @@ -229,4 +229,25 @@ Set.without: example: | >> |1, 2|.without(|2, 3|) = |1| - + +Table.xor: + short: symmetric difference + description: > + Return set with the elements in one, but not both of the arguments. This is + also known as the symmetric difference or disjunctive union. + return: + type: '|T|' + description: > + A set with the symmetric difference of the arguments. + args: + a: + type: '|T|' + description: > + The first set. + b: + type: '|T|' + description: > + The second set. + example: | + >> |1, 2, 3|.xor(|2, 3, 4|) + = |1, 4| -- cgit v1.2.3