Skip to content

Commit

Permalink
docs: Document symdiff
Browse files Browse the repository at this point in the history
  • Loading branch information
bep committed Nov 7, 2018
1 parent ddcb402 commit 5d14d04
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions docs/content/en/functions/symdiff.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
title: "symdiff"
description: "`collections.SymDiff` (alias `symdiff`) returns the symmetric difference of two collections."
date: 2018-11-07
categories: [functions]
menu:
docs:
parent: "functions"
keywords: [collections,intersect,union, complement]
signature: ["COLLECTION | symdiff COLLECTION" ]
hugoversion: "0.51"
aliases: []
---

Example:

```go-html-template
{{ slice 1 2 3 | symdiff (slice 3 4) }}
```

The above will print `[1 2 4]`.

Also see https://en.wikipedia.org/wiki/Symmetric_difference





0 comments on commit 5d14d04

Please sign in to comment.