Skip to content

Commit 2ff932a

Browse files
committed
Added stride(from: through: by:)
1 parent c0b7934 commit 2ff932a

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

Source/Functions.swift

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -177,15 +177,14 @@ public func stride(from start: Int, to end: Int, by stride: Int) -> ISequence<In
177177
}
178178
}
179179

180-
//75284: Silver: can't overload global func on parameter names?
181-
/*public func stride(from start: Int, through end: Int, by stride: Int) -> ISequence<Int> {
180+
public func stride(from start: Int, through end: Int, by stride: Int) -> ISequence<Int> {
182181
precondition(stride > 0, "'by' must be larger than zero")
183182
var i = start
184183
while i <= end {
185184
__yield i;
186185
i += stride
187186
}
188-
}*/
187+
}
189188

190189
public func stride(from start: Double, to end: Double, by stride: Double) -> ISequence<Double> {
191190
precondition(stride > 0, "'by' must be larger than zero")
@@ -197,14 +196,14 @@ public func stride(from start: Double, to end: Double, by stride: Double) -> ISe
197196
}
198197

199198
//75284: Silver: can't overload global func on parameter names?
200-
/*public func stride(from start: Double, through end: Double, by stride: Double) -> ISequence<Double> {
199+
public func stride(from start: Double, through end: Double, by stride: Double) -> ISequence<Double> {
201200
precondition(stride > 0, "'by' must be larger than zero")
202201
var i = start
203202
while i <= end {
204203
__yield i;
205204
i += stride
206205
}
207-
}*/
206+
}
208207

209208
#if TOFFEE
210209

0 commit comments

Comments
 (0)