From: Bjørn Erik Pedersen Date: Wed, 7 Nov 2018 09:00:33 +0000 (+0100) Subject: docs: Document symdiff X-Git-Tag: v0.51~5 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=5d14d04ac;p=brevno-suite%2Fhugo docs: Document symdiff Closes https://github.com/gohugoio/hugoDocs/issues/659 --- diff --git a/docs/content/en/functions/symdiff.md b/docs/content/en/functions/symdiff.md new file mode 100644 index 00000000..b47bd26c --- /dev/null +++ b/docs/content/en/functions/symdiff.md @@ -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 + + + + +