mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
sum types: allow modification in match
This commit is contained in:
@ -447,6 +447,7 @@ pub fn (a []char) index(v char) int {
|
||||
return -1
|
||||
}
|
||||
|
||||
/*
|
||||
// []int.reduce executes a given reducer function on each element of the array,
|
||||
// resulting in a single output value.
|
||||
pub fn (a []int) reduce(iter fn(accum, curr int)int, accum_start int) int {
|
||||
@ -457,6 +458,7 @@ pub fn (a []int) reduce(iter fn(accum, curr int)int, accum_start int) int {
|
||||
}
|
||||
return _accum
|
||||
}
|
||||
*/
|
||||
|
||||
// array_eq<T> checks if two arrays contain all the same elements in the same order.
|
||||
// []int == []int (also for: i64, f32, f64, byte, string)
|
||||
|
Reference in New Issue
Block a user