Skip to content

Commit 757ed10

Browse files
committed
refactor: cast one of the operands of this addition operation to a "long"
1 parent c4a4706 commit 757ed10

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kata/7-kyu/loop-detector/main/Kata.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
interface Kata {
44
static boolean hasLoop(int[] arr) {
5-
return iterate(0, i -> arr[i]).limit(arr.length + 1).allMatch(i -> i < arr.length);
5+
return iterate(0, i -> arr[i]).limit(arr.length + 1L).allMatch(i -> i < arr.length);
66
}
77
}

0 commit comments

Comments
 (0)