From a0c1ea371a527dadf4957b88e871db4becf54d43 Mon Sep 17 00:00:00 2001 From: Samuel Berthe Date: Fri, 14 Oct 2022 17:59:57 +0200 Subject: [PATCH] doc: improve doc for lo.Union --- CHANGELOG.md | 5 +++++ README.md | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5665cc8a..8e78ea4f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ @samber: I sometimes forget to update this file. Ping me on [Twitter](https://twitter.com/samuelberthe) or open an issue in case of error. We need to keep a clear changelog for easier lib upgrade. +## 1.34.0 (2022-10-xx) + +Improving: +- lo.Union: faster and can receive more than 2 lists + ## 1.33.0 (2022-10-14) Adding: diff --git a/README.md b/README.md index 06803933..3c74f3eb 100644 --- a/README.md +++ b/README.md @@ -1664,10 +1664,10 @@ left, right := lo.Difference[int]([]int{0, 1, 2, 3, 4, 5}, []int{0, 1, 2, 3, 4, ### Union -Returns all distinct elements from both collections. Result will not change the order of elements relatively. +Returns all distinct elements from given collections. Result will not change the order of elements relatively. ```go -union := lo.Union[int]([]int{0, 1, 2, 3, 4, 5}, []int{0, 2, 10}) +union := lo.Union[int]([]int{0, 1, 2, 3, 4, 5}, []int{0, 2}, []int{0, 10}) // []int{0, 1, 2, 3, 4, 5, 10} ```