Skip to content

Commit b6e5c95

Browse files
hendrikgitoprypin
authored andcommitted
replace unary < with pred and x .. <y with x ..< y for ranges (#35)
1 parent 8357781 commit b6e5c95

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

examples/odd_even.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ import docopt
1414
let args = docopt(doc)
1515
echo args
1616

17-
for i in 0 .. <args["ODD"].len:
17+
for i in 0 ..< args["ODD"].len:
1818
echo args["ODD"][i] & " " & args["EVEN"][i]

src/private/util.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ proc partition*(s, sep: string): tuple[left, sep, right: string] =
3838
if pos < 0:
3939
(s, "", "")
4040
else:
41-
(s.substr(0, <pos), s.substr(pos, <pos+sep.len), s.substr(pos+sep.len))
41+
(s.substr(0, pos.pred), s.substr(pos, pos.pred+sep.len), s.substr(pos+sep.len))
4242
4343
4444
proc is_upper*(s: string): bool =

0 commit comments

Comments
 (0)