mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
arrays: fix range
This commit is contained in:
parent
a9ca9f45af
commit
316cf025ae
@ -1,8 +1,8 @@
|
||||
module arrays
|
||||
|
||||
fn range<T>(start, end T) []T {
|
||||
mut res := [T(0)]
|
||||
for i := start; i < end; i++ {
|
||||
mut res := [start]
|
||||
for i := start + 1; i < end; i++ {
|
||||
res << i
|
||||
}
|
||||
return res
|
||||
|
Loading…
Reference in New Issue
Block a user