v/vlib/arrays/arrays.v

12 lines
135 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 {
2020-04-26 16:25:54 +02:00
mut res := []T{}
2019-12-25 13:52:27 +01:00
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
*/