I'm stuck with this problem... I would like to enumerate in a regular for loop for one condition, and in reverse for another condition. Something like this:
var enumerator = 0..<length
if(stringPosition == .End) {
enumerator = reverse(enumerator) //[C.Generator.Element] is not convertible to 'Range<Int>'
}
for index in enumerator {
//do stuff
}
I'm getting a not convertible error there, and can't figure out how to proceed with that. I've tried different typecasting magic but that just doesn't work.
How should I sort out the conversion there?