Skip to content

Instantly share code, notes, and snippets.

@gregomni
Created June 23, 2021 14:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gregomni/8842f539e4e70522ab25f0dedde3afa9 to your computer and use it in GitHub Desktop.
Save gregomni/8842f539e4e70522ab25f0dedde3afa9 to your computer and use it in GitHub Desktop.
extension Range where Bound: Strideable {
func stride(by: Bound.Stride) -> StrideTo<Bound> {
Swift.stride(from: lowerBound, to: upperBound, by: by)
}
}
extension ClosedRange where Bound: Strideable {
func stride(by: Bound.Stride) -> StrideThrough<Bound> {
Swift.stride(from: lowerBound, through: upperBound, by: by)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment