[swift-evolution] For-loop revisited
Erica Sadun
erica at ericasadun.com
Tue Mar 8 18:45:35 CST 2016
> On Mar 8, 2016, at 5:32 PM, Dave Abrahams via swift-evolution <swift-evolution at swift.org> wrote:
>
>
> on Tue Mar 08 2016, Maximilian Hünenberger <swift-evolution at swift.org <mailto:swift-evolution at swift.org>> wrote:
>
>> Actually you cannot use the global stride function anymore.
>
> It's coming back; never fear.
https://github.com/apple/swift-evolution/blob/master/proposals/0006-apply-api-guidelines-to-the-standard-library.md <https://github.com/apple/swift-evolution/blob/master/proposals/0006-apply-api-guidelines-to-the-standard-library.md>
extension Strideable {
- public func stride(to end: Self, by stride: Stride) -> StrideTo<Self>
}
+public func stride<T : Strideable>(from start: T, to end: T, by stride: T.Stride) -> StrideTo<T>
extension Strideable {
- public func stride(through end: Self, by stride: Stride) -> StrideThrough<Self>
}
+public func stride<T : Strideable>(from start: T, through end: T, by stride: T.Stride) -> StrideThrough<T>
-- E, will repaste for cookies
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160308/926b415c/attachment.html>
More information about the swift-evolution
mailing list