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

parser: do no allow var names with __; cgen: use __argc

This commit is contained in:
Alexander Medvednikov
2020-04-04 14:55:40 +02:00
parent 95a1bd8470
commit f748390172
3 changed files with 10 additions and 7 deletions

View File

@@ -506,12 +506,12 @@ pub fn (a []char) index(v char) int {
// []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 {
mut _accum := accum_start
mut accum_ := accum_start
for i in a {
_accum = iter(_accum, i)
accum_ = iter(accum_, i)
}
return _accum
return accum_
}
// array_eq<T> checks if two arrays contain all the same elements in the same order.