diff --git a/vlib/builtin/array.v b/vlib/builtin/array.v index 04f6e17665..d24877d046 100644 --- a/vlib/builtin/array.v +++ b/vlib/builtin/array.v @@ -597,51 +597,6 @@ pub fn (a []string) index(v string) int { return -1 } -// index returns the first index at which a given element can be found in the array -// or -1 if the value is not found. -pub fn (a []int) index(v int) int { - for i in 0 .. a.len { - if a[i] == v { - return i - } - } - return -1 -} - -// index returns the first index at which a given element can be found in the array -// or -1 if the value is not found. -pub fn (a []byte) index(v byte) int { - for i in 0 .. a.len { - if a[i] == v { - return i - } - } - return -1 -} - -// index returns the first index at which a given element can be found in the array -// or -1 if the value is not found. -pub fn (a []rune) index(v rune) int { - for i in 0 .. a.len { - if a[i] == v { - return i - } - } - return -1 -} - -// index returns the first index at which a given element can be found in the array -// or -1 if the value is not found. -// TODO is `char` type yet in the language? -pub fn (a []char) index(v char) int { - for i in 0 .. a.len { - if a[i] == v { - return i - } - } - return -1 -} - // 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 (int, int) int, accum_start int) int {