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

11 lines
134 B
V
Raw Normal View History

2019-10-30 16:21:57 +03:00
module arrays
fn range<T>(start, end T) []T {
2019-10-30 17:30:49 +03:00
mut res := [start]
for i := start + 1; i < end; i++ {
2019-10-30 16:21:57 +03:00
res << i
}
return res
}