1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

arrays: remove deprecation from arrays.concat/2; it is a useful abstraction for operating on immutable arrays

This commit is contained in:
Delyan Angelov 2022-09-07 13:25:33 +03:00
parent 21b2a9841a
commit c5ed179e76
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED

View File

@ -310,7 +310,6 @@ pub fn group_by<K, V>(list []V, grouping_op fn (v V) K) map[K][]V {
// Example: arrays.concat([1, 2, 3], 4, 5, 6) == [1, 2, 3, 4, 5, 6] // => true
// Example: arrays.concat([1, 2, 3], ...[4, 5, 6]) == [1, 2, 3, 4, 5, 6] // => true
// Example: arr << [4, 5, 6] // does what you need if arr is mutable
[deprecated]
pub fn concat<T>(a []T, b ...T) []T {
mut m := []T{cap: a.len + b.len}