arrays: fix range
parent
a9ca9f45af
commit
316cf025ae
|
@ -1,8 +1,8 @@
|
||||||
module arrays
|
module arrays
|
||||||
|
|
||||||
fn range<T>(start, end T) []T {
|
fn range<T>(start, end T) []T {
|
||||||
mut res := [T(0)]
|
mut res := [start]
|
||||||
for i := start; i < end; i++ {
|
for i := start + 1; i < end; i++ {
|
||||||
res << i
|
res << i
|
||||||
}
|
}
|
||||||
return res
|
return res
|
||||||
|
|
Loading…
Reference in New Issue