mirror of
https://github.com/gechandesu/ranges.git
synced 2026-01-23 14:54:14 +03:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 39314b474b |
8
ranges.v
8
ranges.v
@@ -32,11 +32,9 @@ pub fn (mut r Range[T]) reset() {
|
|||||||
// with_step returns copy of the range with new step value.
|
// with_step returns copy of the range with new step value.
|
||||||
pub fn (r Range[T]) with_step[T](step T) Range[T] {
|
pub fn (r Range[T]) with_step[T](step T) Range[T] {
|
||||||
return Range[T]{
|
return Range[T]{
|
||||||
start: r.start
|
...r
|
||||||
end: r.end
|
step: step
|
||||||
step: step
|
cur: r.start
|
||||||
is_neg: r.is_neg
|
|
||||||
cur: r.start
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user