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:
parent
21b2a9841a
commit
c5ed179e76
@ -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}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user