v/vlib/arrays/arrays.v

11 lines
129 B
V
Raw Normal View History

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