collections.SymDiff
Returns a slice containing the symmetric difference of two given slices.
- Syntax
- SLICE1 | collections.SymDiff SLICE2
- Returns
- []any
- Alias
- symdiff
Example:
{{ slice 1 2 3 | symdiff (slice 3 4) }} → [1 2 4]Also see https://en.wikipedia.org/wiki/Symmetric_difference.
Last updated:
November 8, 2026
:
content: Remove categories from front matter (1cc1dd83a)
Improve this page