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

12 lines
135 B
V
Raw Normal View History

2019-10-30 16:21:57 +03:00
module arrays
2020-04-14 04:43:59 +03:00
/*
2019-12-25 15:52:27 +03:00
pub fn range<T>(start, end T) []T {
2020-04-26 17:25:54 +03:00
mut res := []T{}
2019-12-25 15:52:27 +03:00
for i := start; i < end; i++ {
2019-10-30 16:21:57 +03:00
res << i
2019-12-25 15:52:27 +03:00
}
2019-10-30 16:21:57 +03:00
return res
2019-12-25 15:52:27 +03:00
}
2020-04-14 04:43:59 +03:00
*/