v/vlib/arrays/arrays.v

12 lines
133 B
V
Raw Normal View History

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