mirror of
https://github.com/samber/lo.git
synced 2026-04-22 15:37:14 +08:00
fa095e4b4f
* fix(doc): fix go playground demo URL * fix(doc): add more go playground demo URL
583 B
583 B
name, slug, sourceRef, category, subCategory, playUrl, variantHelpers, similarHelpers, position, signatures
| name | slug | sourceRef | category | subCategory | playUrl | variantHelpers | similarHelpers | position | signatures | |||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Concat | concat | slice.go#L282 | core | slice | https://go.dev/play/p/Ux2UuR2xpRK |
|
|
160 |
|
Returns a new slice containing all the elements in collections. Concat conserves the order of the elements.
list1 := []int{0, 1}
list2 := []int{2, 3, 4, 5}
flat := lo.Flatten(list1, list2)
// []int{0, 1, 2, 3, 4, 5}