2 ms·
1..5 syntax has been deprecated for about 2 years, now you have 1...5 which is inclusive and 1..<5 which excludes the last element.
by yoz-y 9y ago
1..5 syntax has been deprecated for about 2 years, now you have 1...5 which is inclusive and 1..<5 which excludes the last element.
- bpicolo 9y agodoes it work with expressions? foo()...bar()? I can count on no fingers the amount of times I've hardcoded the length of a loop in production code.
- yoz-y 9y agoYes it does. (both ... and ..< can be used with expressions that return an int)
- masklinn 9y agoI was talking about Kotlin here.
- yoz-y 9y agoAh, I read your comment badly, sorry.