1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
v/vlib/arrays/arrays.v
Alexander Medvednikov 316cf025ae arrays: fix range
2019-10-30 17:30:49 +03:00

11 lines
134 B
V

module arrays
fn range<T>(start, end T) []T {
mut res := [start]
for i := start + 1; i < end; i++ {
res << i
}
return res
}